RFR(XS): 8251527: CTW: C2 (Shenandoah) compilation fails with SEGV due to unhandled catchproj == NULL
Vladimir Kozlov
vladimir.kozlov at oracle.com
Thu Aug 20 19:21:53 UTC 2020
+1
Thanks,
Vladimir K
On 8/20/20 2:45 AM, Christian Hagedorn wrote:
> Hi Roland
>
> That looks good to me.
>
> Best regards,
> Christian
>
> On 20.08.20 11:12, Roland Westrelin wrote:
>>
>> 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