-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stackoverflow in RascalMPL while running the test framework #1920
Comments
I think it would be nice to share your project, as quite some stuff is going wrong here. |
I will do that soon, thanks
…On Wed, 28 Feb 2024 at 15:40, Davy Landman ***@***.***> wrote:
I think it would be nice to share your project, as quite some stuff is
going wrong here.
—
Reply to this email directly, view it on GitHub
<#1920 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADVANN5TVJB3ZEW4EC54GCDYV46VHAVCNFSM6AAAAABD6BZ4ZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRZGEZDSOBVHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Here is the like to the project |
Does it also happen if you call |
I reproduced the behavior. The stackoverflows happen when this test is called:
if I remove this test, everything runs smoothly. |
The trigger is this definition which results in an infinite recursion:
I found this by setting The stackoverflow error thus genuine, so that's not the bug, but the report of this stackoverflow is bad. It should have given a stack trace like so:
Such than easy diagnosis can be made. I'll look into fixing that in the Rascal interpreter. In the mean time this definition would be a good workaround:
|
Looks like an interesting project @BlackHart98 ! |
Simple reproduction:
|
The problem seems to be this code which catches the StackOverflowError just below the deepest stack frame, and then calls more code which needs stack space to print the error: In
|
Yeah figured that out belatedly, but like you said the report is bad but is genuine |
Thinking about the fix now. not so easy :-) I need to get some stack space to create the error, but I also need the information on the stack to create the error message. |
I also noticed that Rascal resolves the project a lot slower, hat could be the issue? |
@BlackHart98 I don't know. What do you mean by "resolves the project". Is that the code for starting a terminal or when you read a file with the Thanks for reporting this one anyway. The solution is underway but I need some advice from @DavyLandman to finalize it. |
Maybe my choice of word was wrong, what I meant is the it takes time to load the rascal project after I save changes(on VSCode) |
Ah yes. No that's a "feature" of the slow type-checker. The more modules you edit, the more it needs to type-check and the slower it becomes. We are working on a compiled version of that as we speak to make that faster. |
If you keep the .tpl files in your target folder, the type-checker will reuse as much as possible. So that helps. I'd put the target folder in your |
Thanks, :-) |
…rsion-overflow This fixes problem #1920 with a failure to throw a StackOverflow exception in case of a real stack overflow in Java code.
I encountered this exception while testing my pretty printer module in rascal:
I only get this issue when increased the number of test. If you need a link to the project I am willing to provide that.
The text was updated successfully, but these errors were encountered: