8073796: assert(check_obj_alignment(result)) failed: address not aligned: ..

Arrays.copyOf intrinsic can deoptimize with uninitialized new array

Reviewed-by: kvn
This commit is contained in:
Roland Westrelin 2015-02-25 12:33:43 +01:00
parent b5f763492e
commit 25a0458907

View File

@ -3868,8 +3868,6 @@ bool LibraryCallKit::inline_array_copyOf(bool is_copyOfRange) {
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 @@ bool LibraryCallKit::inline_array_copyOf(bool is_copyOfRange) {
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) {