-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
Panic at break in an infinte loop, in finally block #3054
Comments
dirkdev98
added a commit
to dirkdev98/boa
that referenced
this issue
Jun 26, 2023
The match was too greedy, being executed for 'break' abrupt completions as well. Closes boa-dev#3054
I'm sorry for not commenting on this before working on this, will make sure to do that going forward. I think this is fixed in #3073 |
github-merge-queue bot
pushed a commit
that referenced
this issue
Jun 27, 2023
The match was too greedy, being executed for 'break' abrupt completions as well. Closes #3054
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
In a try-catch-finally -- in the finally block, panic in a one line break statement after an infinite loop, if there are no braces around the break statement.
To Reproduce
These JavaScripts crash with
thread 'main' panicked at 'stack was empty', boa_engine/src/vm/opcode/control_flow/finally.rs:137:59
or
Expected behavior
Should not panic. Javascript allows one-line statements after a condition to not be encompassed by braces.
Build environment:
• OS: Ubuntu
• Version: 20.04
• Target triple: x86_64-unknown-linux-gnu
• Rustc version: rustc 1.70.0
Additional context
Note that this Javascript does not panic, i.e. if braces are present. It is also clearly breaking out of the infinite loop as "in finally" does get printed.
The text was updated successfully, but these errors were encountered: