src/share/vm/opto/library_call.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/opto/library_call.cpp

src/share/vm/opto/library_call.cpp

Print this page
rev 7901 : 8073796: assert(check_obj_alignment(result)) failed: address not aligned: ...
Summary: Arrays.copyOf intrinsic can deoptimize with uninitialized new array
Reviewed-by:

*** 3867,3878 **** // How many elements will we copy from the original? // The answer is MinI(orig_length - start, length). 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. // Extreme case: Arrays.copyOf((Integer[])x, 10, String[].class). // This will fail a store-check if x contains any non-nulls. --- 3867,3876 ----
*** 3912,3921 **** --- 3910,3921 ---- assert(stopped(), "Should be stopped"); } 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) { ac->set_copyof(validated); } else {
src/share/vm/opto/library_call.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File