RFR(XS): 8251527: CTW: C2 (Shenandoah) compilation fails with SEGV due to unhandled catchproj == NULL
Roland Westrelin
rwestrel at redhat.com
Thu Aug 20 09:12:54 UTC 2020
http://cr.openjdk.java.net/~roland/8251527/webrev.00/
https://bugs.openjdk.java.net/browse/JDK-8251527
This triggers with Shenandoah but the fix (and the bug) is in shared
C2 code.
CallNode::extract_projections(), once it has found the control ProjNode
looks for the CatchNode at the first use of the ProjNode. In the case of
the crash, the ProjNode has more than one use and the first use is not
the CatchNode (but a pinned LoadNode). I propose using unique_ctrl_out()
instead.
The ProjNode has a LoadNode because one is pinned on a ProjNode by
PhaseIdealLoop::split_if_with_blocks_post() when it tries to sink the
LoadNode out of loop. A LoadNode becomes the first use of the ProjNode
after the loop body is cloned during unswitching.
Roland.
More information about the hotspot-compiler-dev
mailing list