[9] RFR(S): 8179678: ArrayCopy with same src and dst can cause incorrect execution or compiler crash

Roland Westrelin rwestrel at redhat.com
Wed May 24 07:55:24 UTC 2017

> with your fix, compiler/arraycopy/TestEliminatedArrayCopyDeopt fails
> on all platforms with:

Thanks. The problem here is that with -XX:-ReduceInitialCardMarks, C2
adds a g1 post barrier between the arraycopy node and the following
membar that ArrayCopyNode::may_modify() doesn't expect. Here is a new


with a fixed ArrayCopyNode::may_modify(). I also added verification code
that calls ArrayCopyNode::may_modify() after an array copy node is
expanded to verify that ArrayCopyNode::may_modify() is consistent with
the just expanded subgraph.


More information about the hotspot-compiler-dev mailing list