RFR: 8370502: C2: segfault while adding node to IGVN worklist [v2]

Kerem Kat krk at openjdk.org
Thu Nov 20 18:28:57 UTC 2025


On Thu, 20 Nov 2025 16:26:13 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:

>> Kerem Kat has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - fix test spacing
>>  - Update src/hotspot/share/opto/macro.cpp
>>    
>>    Co-authored-by: Manuel Hässig <manuel at haessig.org>
>>  - Update src/hotspot/share/opto/macro.cpp
>>    
>>    Co-authored-by: Manuel Hässig <manuel at haessig.org>
>
> src/hotspot/share/opto/macro.cpp line 2314:
> 
>> 2312: 
>> 2313:   Node* ctrl = unlock->in(TypeFunc::Control);
>> 2314:   Node* mem = unlock->in(TypeFunc::Memory);
> 
> Do I understand correctly, that `mem` is never `nullptr` because `UnlockNode` is a subclass of a `SafepointNode` which always has a memory input?

`UnlockNode` is created at https://github.com/openjdk/jdk/blob/b3acc4841f6d9c8fd484df68fd2882dab0aa1788/src/hotspot/share/opto/graphKit.cpp#L3542 and will assert under `GraphKit:memory` if memory is somehow null.

> src/hotspot/share/opto/macro.cpp line 2352:
> 
>> 2350:   _igvn.replace_node(_callprojs.fallthrough_proj, region);
>> 2351: 
>> 2352:   if (_callprojs.fallthrough_memproj != nullptr) {
> 
> Why do we not have to hook up the memory input to the fall through projection if it does not exist in the first place?

Could you clarify the question?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28432#discussion_r2547163948
PR Review Comment: https://git.openjdk.org/jdk/pull/28432#discussion_r2547168105


More information about the hotspot-compiler-dev mailing list