RFR: 8328306: AArch64: MacOS lazy JIT "write xor execute" switching [v2]
Dean Long
dlong at openjdk.org
Fri Sep 26 09:41:11 UTC 2025
On Tue, 23 Sep 2025 10:59:59 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp line 265:
>>
>>> 263: // is called by the signal handler at arbitrary point of
>>> 264: // execution.
>>> 265: ThreadWXEnable wx(WXWrite, thread);
>>
>> I'm not sure this ThreadWXEnable needs to use WXWrite. I had changed it to WXExec in my experiments.
>
> If it can be WXWrite or WXExec, then we don't need to set it at all, I suppose.
There may be cases where code that we call from the signal handler changes the state, so we would need to protect against that by saving and restoring the state. Maybe this should be
ThreadWXEnable wx(thread->get_wx_state(), thread);
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26562#discussion_r2373418294
More information about the hotspot-dev
mailing list