-
Bug
-
Resolution: Unresolved
-
P4
-
repo-valhalla
Attached reproducer, to run with
javac --enable-preview --source 25 --add-exports java.base/jdk.internal.misc=ALL-UNNAMED PutFlatValueCrash.java
java -ea --enable-preview --add-exports java.base/jdk.internal.misc=ALL-UNNAMED -XX:-UseArrayFlattening -Xcomp -XX:CompileCommand=compileonly,"PutFlatValueCrash::test" -XX:-TieredCompilation PutFlatValueCrash
This is because compareAndSetFlatValue uses compareAndSetFlatValueAsBytes which uses putFlatValue on a flat array (provided by newSpecialArray), which is intrinsified and crashes when UseArrayFlattening is disabled.
Note that newSpecialArray would raise if called with -XX:-UseArrayFlattening, this is fine. But putFlatValue shouldn't crash (or be rejected) compile time because it might just be not executed at runtime.
javac --enable-preview --source 25 --add-exports java.base/jdk.internal.misc=ALL-UNNAMED PutFlatValueCrash.java
java -ea --enable-preview --add-exports java.base/jdk.internal.misc=ALL-UNNAMED -XX:-UseArrayFlattening -Xcomp -XX:CompileCommand=compileonly,"PutFlatValueCrash::test" -XX:-TieredCompilation PutFlatValueCrash
This is because compareAndSetFlatValue uses compareAndSetFlatValueAsBytes which uses putFlatValue on a flat array (provided by newSpecialArray), which is intrinsified and crashes when UseArrayFlattening is disabled.
Note that newSpecialArray would raise if called with -XX:-UseArrayFlattening, this is fine. But putFlatValue shouldn't crash (or be rejected) compile time because it might just be not executed at runtime.
- blocks
-
JDK-8352737 [lworld] Fix TestIntrinsics after VarHandle support cleanup
-
- In Progress
-