RFR(S): 8231055: C2: arraycopy with same non escaping src and dest but different positions causes wrong execution

Tobias Hartmann tobias.hartmann at oracle.com
Tue Sep 17 13:06:39 UTC 2019


Hi Roland,

looks reasonable to me.

Small suggestions:
- The comment in macro.cpp:388 is a bit misleading. I would use something like: "Non constant offset
in the array: We can't statically determine the value"
- You don't need a new @bug line in the test but can just add the new bug number separated by a
whitespace.

Best regards,
Tobias

On 17.09.19 10:34, Roland Westrelin wrote:
> 
> http://cr.openjdk.java.net/~roland/8231055/webrev.00/
> 
> When a System.arraycopy() has the same source and destination array and
> that array doesn't escape, at safepoints we need to record the value of
> elements of the array: we can't load element from the source array
> (which is also the destination and is going to be eliminated). The
> current code doesn't take the source and destination positions into and
> records the wrong element values.
> 
> Roland.
> 


More information about the hotspot-compiler-dev mailing list