-
Notifications
You must be signed in to change notification settings - Fork 729
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
J9 failed to detect that the class is not defined during the loading stage? #9323
Comments
I've assigned this to the 0.21.0 milestone which tracks issues for our next release. It may take a few days before someone can dig further into this. |
We are throwing the VerifyError from the loading phase, not linking:
|
Removing the lookupswitch ordering verification code results in the expected NoClassDefFoundError, so this is just an ordering issue with the verification tests (if this is really an issue at all). |
I'm doing some JVM spec reading to confirm the appropriate timing of these errors. |
From the Creation and Loading section of the JVM spec, it states:
Both VerifyError and NoClassDefFoundError subclass LinkageError, so no issues there. Zooming in on:
My understanding here is that the error can be reported at the Linking phase, even if the error itself occurred during Loading. The spec also states that:
I don't think this is the same situation as the Overall, if I'm understanding correctly, it seems like the spec is permissive of both the Hotspot and OpenJ9 forms of handling the class error. However, Here's the output of OpenJ9
Hotspot
|
Hi @fuzzy000! The fix for this issue, as well as #9336 and #9357 has been merged. If you'd like to test out the changes, grab a nightly build with date |
Java -version output
The issue happened in following versions:
Summary of problem
We made some changes to a class file in the Apache Ant project (org/apache/tools/ant/Project.class), and let several JVMs run the corresponding test file (ProjectTest.class) to test that class. OpenJDK series report NoClassDefFoundError while J9 series report VerifyError.
Actually, although the file name is
Project.class
, the content in it is a class namedProjectHelperRepository
. When JVM is processing a class file, it should follow this order: loading, linking, and initializing. NoClassDefFoundError is thrown at the loading stage, and VerifyError is thrown at the linking stage (verification happens during linking). So in this case, since J9 directly throws a VerifyError, maybe J9 failed to check that the class Project is not defined during the loading stage? Is that a defect?Diagnostic files
Verify3.zip
java -cp sootOutput/junit-ant/:hamcrest-core-1.3.jar:junit-4.12.jar org.junit.runner.JUnitCore org.apache.tools.ant.ProjectTest
Execution environment
The text was updated successfully, but these errors were encountered: