8073796: assert(check_obj_alignment(result)) failed: address not aligned: ...
Summary: Arrays.copyOf intrinsic can deoptimize with uninitialized new array
Reviewed-by: kvn
--- a/hotspot/src/share/vm/opto/library_call.cpp Sat Feb 28 12:33:50 2015 +0000
+++ b/hotspot/src/share/vm/opto/library_call.cpp Wed Feb 25 12:33:43 2015 +0100
@@ -3868,8 +3868,6 @@
Node* orig_tail = _gvn.transform(new SubINode(orig_length, start));
Node* moved = generate_min_max(vmIntrinsics::_min, orig_tail, length);
- newcopy = new_array(klass_node, length, 0); // no arguments to push
-
// Generate a direct call to the right arraycopy function(s).
// We know the copy is disjoint but we might not know if the
// oop stores need checking.
@@ -3913,6 +3911,8 @@
validated = true;
}
+ newcopy = new_array(klass_node, length, 0); // no arguments to push
+
ArrayCopyNode* ac = ArrayCopyNode::make(this, true, original, start, newcopy, intcon(0), moved, true,
load_object_klass(original), klass_node);
if (!is_copyOfRange) {