RFR: 8329088: Stack chunk thawing races with concurrent GC stack iteration [v3]

Erik Österlund eosterlund at openjdk.org
Mon Apr 22 09:42:42 UTC 2024


On Wed, 17 Apr 2024 00:40:29 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> Erik Österlund has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Partricio fixes
>
> src/hotspot/share/runtime/continuationFreezeThaw.cpp line 624:
> 
>> 622:     freeze_fast_copy(chunk, chunk_start_sp CONT_JFR_ONLY(COMMA false));
>> 623:   } else { // the chunk is empty
>> 624:     const int chunk_start_sp = chunk->stack_size() - frame::metadata_words_at_top;
> 
> Do we need the minus frame::metadata_words_at_top? Since the chunk is empty I would expect the chunk_start_sp to be the same as for the new chunk case which is just chunk->stack_size().

I think you are right; I changed it to chunk->stack_size() as you propose, and adjusted the bottom to remove the metadata part instead. I think this looks nicer.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18643#discussion_r1574452267


More information about the hotspot-dev mailing list