RFR: 8329088: Stack chunk thawing races with concurrent GC stack iteration [v2]
Erik Österlund
eosterlund at openjdk.org
Tue Apr 16 09:16:42 UTC 2024
On Fri, 12 Apr 2024 14:40:09 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:
>>
>> Nits
>
> src/hotspot/share/runtime/continuationFreezeThaw.cpp line 631:
>
>> 629: chunk->set_max_thawing_size(cont_size());
>> 630: chunk->set_bottom(chunk_start_sp - _cont.argsize());
>> 631: chunk->set_sp(chunk->bottom());
>
> Do we need to set sp? We didn't do it before.
We used to set sp to stack_size() before to say the stack is_empty during thaw. It had an imprecise and fuzzy notion of being empty that accepted various different bottoms depending on argsize. The new definition of is_empty is that bottom == sp, precisely. I don't want to update bottom during thaw, only when the chunk is initialized. Now that we are re-initializing the chunk with a new bottom (due to different arg size), we have to set the sp to bottom to signify that the chunk is_empty() right now.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18643#discussion_r1567023174
More information about the hotspot-dev
mailing list