-
-
Notifications
You must be signed in to change notification settings - Fork 339
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
bug(parser): infinite loop in tsx #169
Comments
As a pointer, I suspect
|
I pin pointed to the loop and this try_parse rewind: But I got stuck to find a solution ... everything is intertwined together like a hairball 😢 |
I give up, I'll copy TypeScript's source code ... |
Boshen
added a commit
that referenced
this issue
Apr 2, 2023
Boshen
added a commit
that referenced
this issue
Apr 2, 2023
Boshen
added a commit
that referenced
this issue
Apr 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is caught by the fuzzer https://github.com/Boshen/oxc/actions/runs/4395420223/jobs/7697210796
To replicate:
Create a
test.tsx
with the following string:1<(V=82<<t-j0<(V=$<LBI<(V=ut<I<(V=$<LBI<(V=uIV=82<<t-j0<(V=$<LBI<(V=ut<I<(V=$<LBI<(V<II>
run
cargo run -p oxc_parser --example parser -- test.tsx
and it will run forever.
I'm gussing this is the result of parsing the ambiguous
<
token, where TypeScript needs to lookahead and rewind forever.The text was updated successfully, but these errors were encountered: