[9] RFR (XXS): 8152857: [TESTBUG] UnsafeGetConstantField.testUnsafeGetFieldUnaligned fails w/ -XX:-UseUnalignedAccesses in -Xcomp mode

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Tue Mar 29 10:39:21 UTC 2016


https://bugs.openjdk.java.net/browse/JDK-8152857

The test fails w/ -XX:-UseUnalignedAccesses in -Xcomp mode because 
inlining of Unsafe.getIntUnaligned() fails.

The fix [1] is to force the inlining to get the unsafe load constant folded.

Best regards,
Vladimir Ivanov

[1]
diff --git a/test/compiler/unsafe/UnsafeGetConstantField.java 
b/test/compiler/unsafe/UnsafeGetConstantField.java
--- a/test/compiler/unsafe/UnsafeGetConstantField.java
+++ b/test/compiler/unsafe/UnsafeGetConstantField.java
@@ -46,6 +46,7 @@
   *                         -XX:+FoldStableValues
   * 
-XX:CompileCommand=dontinline,UnsafeGetConstantField.checkGetAddress()
   *                         -XX:CompileCommand=dontinline,*.test*
+ *                         -XX:CompileCommand=inline,*Unsafe.get*
   *                         -XX:-UseUnalignedAccesses
   *                         compiler.unsafe.UnsafeGetConstantField
   */


More information about the hotspot-compiler-dev mailing list