-
Notifications
You must be signed in to change notification settings - Fork 77
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
This fixes #1920 but it has a backward compatibility problem. #1921
base: main
Are you sure you want to change the base?
Conversation
* stackoverflow errors were not reported properly. Instead the interpreter triggered many more stackoverflow errors while trying to report on them. * fixed this by capturing the deepest overflow exception and wrapping the current runtime stack in a cheap exception object. This object is then thrown an caught by the REPL loop which prints the proper exception stack trace. * We lost the ability to catch a stackOverflow() exception in Rascal code with this. This is problematic since there are tools that use that (drAmbiguity) in case of expected eternal recursions. So for now this is PR and I would like to hear if anybody has ideas on how to fix this properly without loss of this important feature.
At least this fix confirms the diagnosis that the error handler was causing new StackOverflowErrors, which explains the messages printed here #1920. Maybe we can find a proper stack frame deeper in than the REPL is to throw the real |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1921 +/- ##
=======================================
- Coverage 49% 49% -1%
+ Complexity 6165 6163 -2
=======================================
Files 661 662 +1
Lines 58702 58711 +9
Branches 8547 8548 +1
=======================================
- Hits 28965 28961 -4
- Misses 27545 27561 +16
+ Partials 2192 2189 -3 ☔ View full report in Codecov by Sentry. |
d79b2f4
to
d089ff6
Compare
@PaulKlint I'm not sure if we could implement catchable |
…Overflow exception just in time for the ctach block
interpreter triggered many more stackoverflow errors while trying to
report on them.
the current runtime stack in a cheap exception object. This object is
then thrown an caught by the REPL loop which prints the proper
exception stack trace.
code with this. This is problematic since there are tools that use
that (drAmbiguity) in case of expected eternal recursions. So for now
this is PR and I would like to hear if anybody has ideas on how to fix
this properly without loss of this important feature.