RFR: 8359344: C2: Malformed control flow after intrinsic bailout [v2]

Marc Chevalier mchevalier at openjdk.org
Tue Jul 8 13:38:26 UTC 2025


On Mon, 7 Jul 2025 07:28:37 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove useless loop
>
> src/hotspot/share/opto/library_call.cpp line 2376:
> 
>> 2374:   state.map = clone_map();
>> 2375:   for (DUIterator_Fast imax, i = control()->fast_outs(imax); i < imax; i++) {
>> 2376:     Node* out = control()->fast_out(i);
> 
> Could we have a similar issue with non-control users? For example, couldn't we also have stray memory users after bailout?

We could, but it should be relatively harmless. Control is more annoying to have more than one successor.

> src/hotspot/share/opto/library_call.cpp line 2393:
> 
>> 2391:     Node* out = control()->fast_out(i);
>> 2392:     if (out->is_CFG() && out->in(0) == control() && out != map() && !state.ctrl_succ.member(out)) {
>> 2393:       out->set_req(0, C->top());
> 
> Could `out` already be in the GVN hash ("remove node from hash table before modifying it")?

I've added it, since indeed, it could. As far as I understand, I was just lucky in the situation where it happens, but there is no reason it would always hold.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25936#discussion_r2192553330
PR Review Comment: https://git.openjdk.org/jdk/pull/25936#discussion_r2192556138


More information about the graal-dev mailing list