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.
Someone duplicated this issue rather than using this existing bug... :(
11-11-2016
I see that the AARCH64 version of JDK-8160591 did not make it into JDK 9 yet [1].
Please find a patch below (essentially the same patch as Andrew pushed into the jdk8u tree. Roland has built a VM with that patch and he has also verified that the compiler/c1/TestArrayCopyToFromObject.java [2] test passes with the patched VM.
diff --git a/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp b/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
--- a/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
+++ b/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
@@ -2249,6 +2249,25 @@
__ cbz(dst, *stub->entry());
}
+ // If the compiler was not able to prove that exact type of the source or the destination
+ // of the arraycopy is an array type, check at runtime if the source or the destination is
+ // an instance type.
+ if (flags & LIR_OpArrayCopy::type_check) {
+ if (!(flags & LIR_OpArrayCopy::LIR_OpArrayCopy::dst_objarray)) {
+ __ load_klass(tmp, dst);
+ __ ldrw(rscratch1, Address(tmp, in_bytes(Klass::layout_helper_offset())));
+ __ cmpw(rscratch1, Klass::_lh_neutral_value);
+ __ br(Assembler::GE, *stub->entry());
+ }
+
+ if (!(flags & LIR_OpArrayCopy::LIR_OpArrayCopy::src_objarray)) {
+ __ load_klass(tmp, src);
+ __ ldrw(rscratch1, Address(tmp, in_bytes(Klass::layout_helper_offset())));
+ __ cmpw(rscratch1, Klass::_lh_neutral_value);
+ __ br(Assembler::GE, *stub->entry());
+ }
+ }
+
// check if negative
if (flags & LIR_OpArrayCopy::src_pos_positive_check) {
__ cmpw(src_pos, 0);
[1] http://hg.openjdk.java.net/jdk9/hs/hotspot/file/031e87605d21/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
[2] http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/7b0aac4c2aac#l3.2