[11] RFR(S): 8205940: LoadNode::find_previous_arraycopy fails with "broken allocation" assert
Tobias Hartmann
tobias.hartmann at oracle.com
Thu Jun 28 15:50:46 UTC 2018
Hi,
please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8205940
http://cr.openjdk.java.net/~thartmann/8205940/webrev.00/
We assert in LoadNode::find_previous_arraycopy(..) when trying to find an arraycopy that initializes
the memory read by a LoadNode. The problem is that the arraycopy destination array allocation is
hidden behind a PhiNode and therefore AllocateNode::Ideal_allocation(..) returns NULL.
I think what happened is that there is an AllocateArray + ArrayCopy combination in a loop exit that
was emitted for the clone intrinsic. Then the loop invariant ArrayCopy is moved out of the loop but
the AllocateArray is not because it is loop dependent. During loop unswitching, we create a phi node
to merge the AllocateArray results from the exits of two different loop versions.
The assert is too strong and should be removed. Unfortunately, I was only able to reproduce this
with replay compilation and the patch attached to the bug.
Thanks,
Tobias
More information about the hotspot-compiler-dev
mailing list