[lworld] RFR: C2 arraycopy intrinsic fixes
Tobias Hartmann
tobias.hartmann at oracle.com
Fri Jun 8 10:20:57 UTC 2018
Hi,
http://cr.openjdk.java.net/~thartmann/valhalla/lworld/arraycopy_fixes/
This patch fixes two problems with the arraycopy intrinsic that Harold found when running JCK tests:
(1) We crash in macroArrayCopy.cpp:1408 because top_src is NULL. This is because we already
validated the src/dst types in LibraryCallKit::inline_arraycopy() and added a check cast of src to
the dst type. Since dst is of static type java.lang.Object (i.e., not an array type), top_src is
NULL. We should not check for flattened value type arrays if ac->is_arraycopy_validated().
(2) We hit the following assert in macroArrayCopy.cpp:549: "assert(basic_elem_type != T_ARRAY)
failed: caller must fix this". We should pass T_OBJECT as basic type if dest_elem=T_ARRAY.
All failing tests now pass.
Thanks,
Tobias
More information about the valhalla-dev
mailing list