-
Notifications
You must be signed in to change notification settings - Fork 497
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] A possible bug in Verification: Dragonwell skipped an erroneous instruction? #97
Comments
Thanks for reporting! I tried your testcase with OpenJDK build 8u and 11u, (using docker image 'adoptopenjdk/openjdk11' and 'adoptopenjdk/openjdk8'), and I see exactly the same error messages as Dragonwell. I guess this may be a difference between HotSpot and J9. Personally speaking, as a JDK developer I care more about specification instead of implementation. OpenJDK is the de facto standard, a.k.a 'reference implementation', if any other implementation (e.g. OpenJ9) behaves differently from OpenJDK (HotSpot), it might mean a potential bug in that implementation (not always :-) ). So for this particular case, I may not consider it as Dragonwell bug. Dragonwell derives from OpenJDK, they share most of the code, I think the class verification part ought to be identical. Please use OpenJDK as the baseline to report a Dragonwell bug in your future testing. BTW, are you working on some experimental regarding to class verification/transforming? maybe we can have more casual discussion in the DingTalk group. Cheers! |
Thanks for your response! Actually we are performing fuzz testing and differential testing on 8 different JVMs now. As you said, it seems most of the discrepancies of behaviors are caused by the defects in J9, rather than OpenJDK and Dragonwell. We will try more seeds for fuzzing. We hope we can find more bugs and make JVMs better and better! |
By the way, it was also confirmed by Oracle https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8243483 : ) |
Description
We made some changes to a class file in the Apache Ant project(ant-launcher/org/apache/tools/ant/launch/Launcher.class), and let several JVMs run it. We found the following discrepancy in the behaviors of Dragonwell (8.2.2, 11.0.5.1) and J9 (8u232, 11.0.5):
Dragonwell8:
Dragonwell11:
J9 8u232:
J9 11.0.5
The point is, Dragonwell says it is the problem at
Register 12
, while J9 says it isRegister 10
(locals[10]
). However, in most other cases, they behave consistently. For example, if you try this caseantVerify1-consistent.zip (reproduce steps is the same), you will find that their reports are consistent (
Register 17
andlocals[17]
).I used javap to look at the instructions in that buggy function javap-0295-setProperty.log, J9 obviously throw the error at
153: load 10
(as the error message says), while dragonwell throw the error at189: astore 12
or206: aload 12
(only these two lines involveRegister 12
). It seems that Dragonwell just skipped the error at153: load 10
, and just report another error in later lines.Steps to Reproduce
Steps to reproduce the behavior:
antVerify2
directory, run commandjava -cp ant-launcher/ org.apache.tools.ant.launch.Launcher compile jar run
Expected behavior
It is expected to throw
java.lang.VerifyError: Register 10 contains wrong type
, but it throwsjava.lang.VerifyError: Register 12 contains wrong type
.JDK version
Execution environment
The text was updated successfully, but these errors were encountered: