JDK-8332525 : Incorrect result with C2 compiled code after JDK-8324517
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 23
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2024-05-20
  • Updated: 2024-05-23
  • Resolved: 2024-05-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 23
23Resolved
Related Reports
Duplicate :  
Relates :  
Description
The actual test log shows:

RUNNING with _BASIC _C2_STRESS
Saving result: fails 269
    Failed!
RUNNING with _BASIC _C2_STRESS
Saving result: fails 269
    Failed!
Test r2-269 FAILED
r2-269 (233 lines) [147 passed, 0 crashes, 2 fails, 0 hangs, 0 incorrect tests, 121 Reference Java failures] - 89%/300

The jtr files shows

r2- 300: 167 passed, 0 crashes, 2 fails, 0 hangs, 0 incorrect tests, 132 Reference Java failures

Finished at: Mon May 20 05:25:06 UTC 2024


----------System.err:(15/908)----------
java.lang.RuntimeException: assertEquals expected: 1 but was: 2
	at jdk.test.lib.Asserts.fail(Asserts.java:691)
	at jdk.test.lib.Asserts.assertEquals(Asserts.java:204)
	at jdk.test.lib.Asserts.assertEquals(Asserts.java:191)
	at applications.javafuzzer.JavaFuzzerRunner.reportResults(JavaFuzzerRunner.java:294)
	at applications.javafuzzer.JavaFuzzerRunner.runWithConfigurations(JavaFuzzerRunner.java:315)
	at applications.javafuzzer.JavaFuzzerRunner.main(JavaFuzzerRunner.java:337)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
	at java.base/java.lang.Thread.run(Thread.java:1575)

Aside: Shouldn't the assert be checkibg for zero failures not 1?
Comments
Roland, could you please have a look? Thanks.
21-05-2024

ILW = Incorrect result with C2 compiled code, reproducible with JavaFuzzer generated test, no known workaround but disable compilation of affected method = HMM = P2
21-05-2024

Reproduces with attached Test.java java -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -XX:-TieredCompilation -Xbatch Test.java > stress.log && java -Xint Test.java > base.log && diff base.log stress.log It's a regression from JDK-8324517 in JDK 23.
21-05-2024