JDK-8346316 : Test compiler/rangechecks/TestLongRangeCheck.java failed with AOTClassLinking enabled
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-12-17
  • Updated: 2025-03-03
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 25
25Unresolved
Related Reports
Relates :  
Description
----------messages:(7/791)----------
command: main -ea -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=5000 -XX:PerMethodTrapLimit=100 TestLongRangeCheck
reason: User specified action: run main/othervm -ea -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=5000 -XX:PerMethodTrapLimit=100 TestLongRangeCheck 
started: Mon Dec 16 11:44:40 UTC 2024
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules java.base --add-exports java.base/jdk.internal.util=ALL-UNNAMED
finished: Mon Dec 16 11:44:43 UTC 2024
elapsed time (seconds): 3.904
----------configuration:(4/111)----------
Boot Layer
  add modules: java.base                   
  add exports: java.base/jdk.internal.util ALL-UNNAMED

----------System.out:(1/120)----------
[0.029s][error][cds] CDS archive has aot-linked classes. It cannot be used when archived full module graph is not used.
----------System.err:(12/720)----------
java.lang.RuntimeException: should have been deoptimized
	at TestLongRangeCheck.assertIsNotCompiled(TestLongRangeCheck.java:62)
	at TestLongRangeCheck.main(TestLongRangeCheck.java:329)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1447)

It looks like the test is run in an AOT configuration:

-XX:+AOTClassLinking -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:+TieredCompilation -XX:+DeoptimizeALot

 but the exec'd VM is not passed the AOT flag(s).
Comments
Failing in every tier 8 run. 11 linked failures
19-01-2025

I think this is a test bug, we assume that testStridePosScalePosInIntLoopOverflow would be deopted when Preconditions.checkIndex fails apparently that does not happen. Not sure if this is really due to AOTCLassLinking or rather due to -XX:+DeoptimizeALot which might have triggered an earlier deopt and recompilation without a trap. Marking as test bug for now.
08-01-2025

Initial ILW = Test failure due to missing deoptimization with AOTClassLinking, single test, no workaround = MLH = P4
06-01-2025