JDK-8159129 : TestStringIntrinsicRangeChecks fails w/ No exception thrown for compressByte/inflateByte
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-06-09
  • Updated: 2016-08-11
  • Resolved: 2016-07-05
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 9
9 b131Fixed
Related Reports
Relates :  
Description
compiler/intrinsics/string/TestStringIntrinsicRangeChecks.java fail on x86 w/ -XX:-TieredCompilation


#section:main
----------messages:(4/259)----------
command: main compiler.intrinsics.string.TestStringIntrinsicRangeChecks
reason: User specified action: run main compiler.intrinsics.string.TestStringIntrinsicRangeChecks 
Mode: othervm [test or library overrides a system module]
elapsed time (seconds): 6.813
----------configuration:(3/115)----------
Boot Layer
  patch: java.base /scratch/home/aurora/sandbox/results/workDir/classes/14/compiler/patches/java.base 

----------System.out:(0/0)----------
----------System.err:(14/1153)----------
java.lang.RuntimeException: No exception thrown for compressByte([B@260df44e, 9, 16, 6, 0)
	at compiler.intrinsics.string.TestStringIntrinsicRangeChecks.check(TestStringIntrinsicRangeChecks.java:77)
	at compiler.intrinsics.string.TestStringIntrinsicRangeChecks.main(TestStringIntrinsicRangeChecks.java:102)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110)
	at java.lang.Thread.run(java.base@9-internal/Thread.java:843)

JavaTest Message: Test threw exception: java.lang.RuntimeException: No exception thrown for compressByte([B@260df44e, 9, 16, 6, 0)
JavaTest Message: shutting down test
Comments
Tobias, thanks for the update. Pushing to JDK-hs-comp is fine. Sorry for the delay in replying; I was on holiday yesterday.
05-07-2016

Hi Daniel, yes, the fix is out for review on hotspot-compiler-dev: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2016-June/023571.html I'll push the fix as soon as it is reviewed. Do you want me to push this directly into hs? Otherwise, I'll push into hs-comp.
04-07-2016

This bug was filed on 2016.06.09 for test failures that happened at least that long ago. This test should have been quarantined back on 2016.06.10 or 2016.06.13 at the latest. It looks like Tobias has a fix in process so I'll hold off on quarantining this test until I can check in with Tobias (next week at the earliest).
01-07-2016

The test fails because the inflate/compress String intrinsic sometimes does not throw an exception if the src or dst offset are out of bounds. The problem is that we convert the char offsets to byte offsets only after the range check. We should do this before. To avoid such errors, we should try to move the range checks from the intrinsics into the Java code (I'll investigate this with JDK-8156534). http://cr.openjdk.java.net/~thartmann/8159129/webrev.00/
29-06-2016

ILW = incorrect behavior; -Tiered mode; none = MMH = P3
10-06-2016

vm flags: -Xmixed -server -XX:-TieredCompilation -XX:MaxRAMFraction=8 -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions
09-06-2016

failed on solaris-amd64 and sparcv9 on different method: #section:main ----------messages:(4/258)---------- command: main compiler.intrinsics.string.TestStringIntrinsicRangeChecks reason: User specified action: run main compiler.intrinsics.string.TestStringIntrinsicRangeChecks Mode: othervm [test or library overrides a system module] elapsed time (seconds): 5.68 ----------configuration:(3/114)---------- Boot Layer patch: java.base /export/local/aurora/sandbox/results/workDir/classes/1/compiler/patches/java.base ----------System.out:(0/0)---------- ----------System.err:(14/1153)---------- java.lang.RuntimeException: No exception thrown for inflateByte([B@1409691e, 9, 16, 15, 0) at compiler.intrinsics.string.TestStringIntrinsicRangeChecks.check(TestStringIntrinsicRangeChecks.java:77) at compiler.intrinsics.string.TestStringIntrinsicRangeChecks.main(TestStringIntrinsicRangeChecks.java:104) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(java.base@9-internal/Thread.java:843) JavaTest Message: Test threw exception: java.lang.RuntimeException: No exception thrown for inflateByte([B@1409691e, 9, 16, 15, 0) JavaTest Message: shutting down test STATUS:Failed.`main' threw exception: java.lang.RuntimeException: No exception thrown for inflateByte([B@1409691e, 9, 16, 15, 0)
09-06-2016