-
Notifications
You must be signed in to change notification settings - Fork 357
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
Compiler Crash on Parsing Specific Java Program #6631
Comments
The issue is caused by the Unicode escape sequence So, But the parser parses till |
For clarification, in the above "the parser" means "JavaParser": this is a JavaParser bug. Is that correct? A workaround would be to do a pre-processing step for Unicode escape sequences, before calling JavaParser. |
Can this problem be reproduced in a regular type-checker test suite, or only in the ainfer test suite as you described above? |
Yes, the JavaParser. |
I've only tried it in ainfer. I don't have experience with the regular type-checker test suites, so could you provide more information on those? |
@mernst based on the description above, it would be possible to trigger this bug without The bug is unlikely to occur in practice outside of WPI/ |
Nice find!
To be clear, this is because it does not treat the Since this is a JavaParser bug, maybe best to also report it upstream to them? |
I think it's intentional: see the discussion at javaparser/javaparser#2265. I have the test passing locally by changing the JavaParser configuration to use the option that's mentioned in that JavaParser issue. I'll put up a PR soon. |
PR with fix is here: #6632 |
Yes. |
Description:
An exception occurs in the compiler (11.0.23) when parsing a specific Java program. Below are the details of the crash and a reproducer. This issue can be demonstrated by running
./gradlew ainferTestCheckerAjavaTest
after adding the test to eitherchecker/tests/all-systems
orchecker/tests/ainfer-testchecker/non-annotated
.Crash Log:
Reproducer:
The exception occurs when the print statement is inside the
while
loop body.Steps to Reproduce:
checker/tests/all-systems
orchecker/tests/ainfer-testchecker/non-annotated
../gradlew ainferTestCheckerAjavaTest
.The text was updated successfully, but these errors were encountered: