Running jck:vm/jvmti/ForceEarlyReturn* tests in Graal as JIT mode intermittently and randomly fail.
Here the list of tests which failed with latest jdk12 bits:
vm/jvmti/ForceEarlyReturnVoid/ferv001/ferv00102/ferv00102.html
Uncaught exception while adjusting compilation level: java.lang.ArrayIndexOutOfBoundsException: Index -263862456 out of bounds for length 5
vm/jvmti/ForceEarlyReturnInt/feri001/feri00104/feri00104.html
Trying to acquire a lock on 'testLock' object ... Uncaught exception while adjusting compilation level: java.lang.NullPointerException
vm/jvmti/ForceEarlyReturnInt/feri001/feri00103/feri00103.html
Uncaught exception while adjusting compilation level: java.lang.NullPointerException
vm/jvmti/ForceEarlyReturnDouble/ferd001/ferd00105/ferd00105.html
Uncaught exception while adjusting compilation level: java.lang.ArrayIndexOutOfBoundsException: Index -263862456 out of bounds for length 5
The issue is not new and is seen in previous builds.
The issue Graal specific. No issue if Graal is not used.
A little bit more detailed output is:
Uncaught exception while adjusting compilation level: java.lang.ArrayIndexOutOfBoundsException: Index -263862456 out of bounds for length 5
java.lang.ArrayIndexOutOfBoundsException: Index -263862456 out of bounds for length 5
at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.adjustCompilationLevel(jdk.internal.vm.ci@12-internal/HotSpotJVMCIRuntime.java:503)
at javasoft.sqe.tests.vm.jvmti.ferd001.ferd00105.TestThread.testedMethod(ferd00105.java:133)
at javasoft.sqe.tests.vm.jvmti.ferd001.ferd00105.TestThread.run(ferd00105.java:152)
Unexpected returned value after ForceEarlyReturnDouble() successful call:
retValue=1.0
lockReleased=false
. . .
Uncaught exception while adjusting compilation level: java.lang.NullPointerException
java.lang.NullPointerException
at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.adjustCompilationLevel(jdk.internal.vm.ci@12-internal/HotSpotJVMCIRuntime.java:503)
at javasoft.sqe.tests.vm.jvmti.feri001.feri00103.TestThread.testedMethod(feri00103.java:128)
at javasoft.sqe.tests.vm.jvmti.feri001.feri00103.TestThread.run(feri00103.java:147)
Trying to acquire a lock ... acquired.
Unexpected returned value after ForceEarlyReturnInt() successful call: 1
. . .
Trying to acquire a lock on 'testLock' object ... Uncaught exception while adjusting compilation level: java.lang.NullPointerException
java.lang.NullPointerException
at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.adjustCompilationLevel(jdk.internal.vm.ci@12-internal/HotSpotJVMCIRuntime.java:503)
at javasoft.sqe.tests.vm.jvmti.feri001.feri00104.TestThread.testedMethod(feri00104.java:131)
at javasoft.sqe.tests.vm.jvmti.feri001.feri00104.TestThread.run(feri00104.java:151)
lock acquired.
Unexpected returned value after ForceEarlyReturnInt() successful call: 1
. . .
Uncaught exception while adjusting compilation level: java.lang.ArrayIndexOutOfBoundsException: Index -263862456 out of bounds for length 5
java.lang.ArrayIndexOutOfBoundsException: Index -263862456 out of bounds for length 5
at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.adjustCompilationLevel(jdk.internal.vm.ci@12-internal/HotSpotJVMCIRuntime.java:503)
at javasoft.sqe.tests.vm.jvmti.ferv001.ferv00102.TestThread.testedMethod(ferv00102.java:134)
at javasoft.sqe.tests.vm.jvmti.ferv001.ferv00102.TestThread.run(ferv00102.java:156)
Unexpected returned value after successful ForceEarlyReturnVoid() call:
thread.a: 2
thread.b: 2
. . .
So that, it is failing in the JIT compiler function:
jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.adjustCompilationLevel()