[11u] 8263361: Incorrect arraycopy stub selected by C2 for SATB collectors
Roland Westrelin
rwestrel at redhat.com
Thu Apr 15 15:59:39 UTC 2021
Original bug:
https://bugs.openjdk.java.net/browse/JDK-8263361
https://github.com/openjdk/jdk/commit/5d87a219
Original patch does not apply cleanly to 11u, because context differs
for some files but patch is otherwise identical. Failed hunks are below.
11u webrev:
https://cr.openjdk.java.net/~roland/8263361.11u/webrev.00/
Testing: x86_64 build, tier1
Thanks,
Roland.
src/hotspot/share/opto/library_call.cpp.rej
--- library_call.cpp
+++ library_call.cpp
@@ -4143,8 +4143,8 @@ bool LibraryCallKit::inline_native_clone(bool is_virtual) {
PreserveJVMState pjvms2(this);
set_control(is_obja);
// Generate a direct call to the right arraycopy function(s).
- Node* alloc = tightly_coupled_allocation(alloc_obj, NULL);
- ArrayCopyNode* ac = ArrayCopyNode::make(this, true, obj, intcon(0), alloc_obj, intcon(0), obj_length, alloc != NULL, false);
+ // Clones are always tightly coupled.
+ ArrayCopyNode* ac = ArrayCopyNode::make(this, true, obj, intcon(0), alloc_obj, intcon(0), obj_length, true, false);
ac->set_clone_oop_array();
Node* n = _gvn.transform(ac);
assert(n == ac, "cannot disappear");
src/hotspot/share/opto/macroArrayCopy.cpp.rej
--- macroArrayCopy.cpp
+++ macroArrayCopy.cpp
@@ -660,11 +670,10 @@ Node* PhaseMacroExpand::generate_arraycopy(ArrayCopyNode *ac, AllocateArrayNode*
Node* local_ctrl = *ctrl;
MergeMemNode* local_mem = MergeMemNode::make(mem);
transform_later(local_mem);
-
is_partial_array_copy = generate_unchecked_arraycopy(&local_ctrl, &local_mem,
adr_type, copy_type, disjoint_bases,
src, src_offset, dest, dest_offset,
- ConvI2X(copy_length), dest_uninitialized);
+ ConvI2X(copy_length), acopy_to_uninitialized);
// Present the results of the fast call.
result_region->init_req(fast_path, local_ctrl);
More information about the jdk-updates-dev
mailing list