-
Notifications
You must be signed in to change notification settings - Fork 749
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
Symtab#inferModule returns null for java.lang #3710
Comments
cc @Stephan202 FYI We saw a similar internal crash that bisected to cc6bc69 It seems like |
I've also found in latest version (2.18.0):
|
The IndexOutOfBoundsException in UnusedVariable is a different bug: #1700 |
cc6bc69 has been rolled back, but I'll leave this open to track fixing forward. I haven't had time to investigate much yet. |
Same here; yesterday I tried to reproduce it using a tiny unit test, but that failed. Next up would be to have a closer look at @ascopes' code, but looking at my agenda, I doubt I'll find a moment before the weekend. |
No rush or anything! Thanks for taking the time |
Just been thinking about this a bit. The only things I can think of that would differ to running javac normally is that the file manager I use is a custom one that does not implement StandardFileManager, so some information would not be present that StandardFileManager provides. I don't believe this should impact anything unless there is already a bug in javac though. JDK 12, 13, 14, ..., 17, 18 and 19 all pass on this which makes me think it could be a javac bug. The only other thing that might be related is that the JavaFileObject that I use does not supply the access level info or the nesting kind. Instead, it returns null. That should be valid under the file object API though. Again, I'd expect it to fail under JDK12 as well though if this was the issue. If not, could this be related to JPMS visibility somewhere? Since the file manager I am using is custom, it lives in a separate module. To get error prone to work, I had to open internal JDK modules via JVM arguments passed to Maven Surefire. -- |
See google/error-prone#3710 for issue tracking Signed-off-by: Ashley <[email protected]>
See google/error-prone#3710 Signed-off-by: Ashley <[email protected]>
See google/error-prone#3710 Signed-off-by: Ashley <[email protected]>
See google/error-prone#3710 Signed-off-by: Ashley <[email protected]>
I am writing a test framework for testing compiler plugins and annotation processors with Javac (OpenJDK toolchain).
One of my acceptance test packs runs ErrorProne. Last night I got a Dependabot update to move from 2.17.0 to 2.18.0.
This seems to introduce a NullPointerException on JDK 17 (Temurin) on Ubuntu 22, Mac OS 12, and Windows Server 2022. On JDK 12 and newer, this issue does not occur.
Dropping a report about this as requested in the error message :-)
Failing code is being hit at https://github.com/ascopes/java-compiler-testing/tree/1e138d28a5979cc14aa2401cab66283ac0058c50/acceptance-tests/acceptance-tests-error-prone (which should be buildable and able to have a debugger attached if you are unable to reproduce this yourselves).
Failing Dependabot PR: ascopes/java-compiler-testing#242
Failing code:
Invoked via test case
Stacktrace:
The text was updated successfully, but these errors were encountered: