RFR: 8266742: Check W^X state on possible safepoint [v2]

Gerard Ziemski gziemski at openjdk.java.net
Mon May 17 16:16:45 UTC 2021


On Mon, 17 May 2021 09:14:45 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> If we push the check too low we only do it when we hit this code and there is something to process, but we want to detect when we reach this code in the wrong state even if we wouldn't actually crash at this time due to there not being an active poll.
>> 
>> David
>
> David, thanks, this is exactly how it meant to be.
> 
> The crash happens when a thread is synchronized for MarkActivationClosure. Having the check in the HandshakeState::process_self_inner would catch the wrong state when a thread is synchronized also for something else. The patch catches the wrong state if a thread polls synchronization, it does not need to actually synchronize to trigger the check. So we'll catch more.

Thank you for the explanation.

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

PR: https://git.openjdk.java.net/jdk/pull/3920


More information about the hotspot-runtime-dev mailing list