-
-
Notifications
You must be signed in to change notification settings - Fork 400
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 when parsing fuzzed code #1768
Comments
One question, though. Why are you calling |
If you look at https://doc.rust-lang.org/std/mem/fn.drop.html it says it's literally defined as pub fn drop<T>(_x: T) { } I do it to silence the unused variable warning that you otherwise get from the |
I've tried to diagnose it and I'm pretty sure it's a bug in the lexer, I think its because there is only a |
The The line trying to peek is here boa/boa/src/syntax/parser/expression/assignment/mod.rs Lines 149 to 153 in d831ff3
I have the peeking visualized below:
This seems to be the max size we expected, the boa/boa/src/syntax/parser/cursor/buffered_lexer/mod.rs Lines 136 to 141 in d831ff3
|
Describe the bug
The code should not panic.
To Reproduce
Expected behavior
It shouldn't panic, and it should parse correctly (as whatever it's meant to parse as, not sure.)
Build environment:
x86_64-unknown-linux-gnu
(I think, couldn't find how to print it and I don't think it's terribly important here)rustc 1.59.0-nightly (cfa3fe5af 2021-12-31)
The text was updated successfully, but these errors were encountered: