-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
[Merged by Bors] - fuzzer: bubble up NoInstructionsRemain error instead of trying to handle as exception #2566
[Merged by Bors] - fuzzer: bubble up NoInstructionsRemain error instead of trying to handle as exception #2566
Conversation
I'm not sure what's going on with the
might be related to a recent Rust release |
try { new function() { while (this) {} }(); } catch { } was panicking with "internal error: entered unreachable code: The NoInstructionsRemain native error cannot be converted to an opaque type"
Codecov Report
@@ Coverage Diff @@
## main #2566 +/- ##
==========================================
+ Coverage 50.01% 50.02% +0.01%
==========================================
Files 380 379 -1
Lines 37786 37824 +38
==========================================
+ Hits 18898 18922 +24
- Misses 18888 18902 +14
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Hi, thanks for the contribution! This indeed seems like undesirable behaviour for the I think with the proposed change we would run into infinite loops while fuzzing. Take for example this code: while (true) {
try {
new function() {
while (true) {}
}();
} catch {
}
} The error would be thrown in I'm not 100% sure what the best solution for this problem is. Maybe instead of adding a lot of fuzzing specific logic to the vm, we could keep the panic, catch it in the fuzzer and somehow signal the fuzzer that this was a |
Yes, it looks like some of the callers of (Unfortunately there's no better way to do this, but running the fuzzer with your while-try-while testcase hardcoded works/terminates fine.) |
True, with that in mind this should work. @jedel1043 I think you brought up the panic on |
I think it should be ok. Though, if any problems arise, we could just make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
bors r+ |
…dle as exception (#2566) Hi, the `vm-implied` fuzzer panics when executing this testcase: ```javascript try { new function() { while (this) {} }(); } catch { } ``` `internal error: entered unreachable code: The NoInstructionsRemain native error cannot be converted to an opaque type` Handling the `NoInstructionsRemain` error upfront instead of going through the VM exception handling logic seems to work.
Pull request successfully merged into main. Build succeeded: |
Hi,
the
vm-implied
fuzzer panics when executing this testcase:internal error: entered unreachable code: The NoInstructionsRemain native error cannot be converted to an opaque type
Handling the
NoInstructionsRemain
error upfront instead of going through the VM exception handling logic seems to work.