RFR: 8327963: C2: fix construction of memory graph around Initialize node to prevent incorrect execution if allocation is removed [v5]

Roland Westrelin roland at openjdk.org
Thu May 15 12:35:56 UTC 2025


On Mon, 28 Apr 2025 09:21:44 GMT, Galder Zamarreño <galder at openjdk.org> wrote:

>> Roland Westrelin has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Update src/hotspot/share/opto/escape.cpp
>>    
>>    Co-authored-by: Emanuel Peter <emanuel.peter at oracle.com>
>>  - Update src/hotspot/share/opto/escape.cpp
>>    
>>    Co-authored-by: Emanuel Peter <emanuel.peter at oracle.com>
>
> src/hotspot/share/opto/library_call.cpp line 5554:
> 
>> 5552:       if (proj->_con == TypeFunc::Memory) {
>> 5553:         int alias_idx = C->get_alias_index(proj->adr_type());
>> 5554:         assert(alias_idx == Compile::AliasIdxRaw || alias_idx == elemidx || alias_idx == mark_idx || alias_idx == klass_idx, "should be raw memory or array element type");
> 
> Shouldn't this `assert` be wrapped around an `#ifdef ASSERT` section?

`assert` is a nop if `ASSERT` not defined. Does that answer your question?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24570#discussion_r2091068927


More information about the hotspot-compiler-dev mailing list