RFR: 8328306: AArch64: MacOS lazy JIT "write xor execute" switching [v3]

Andrew Haley aph at openjdk.org
Mon Aug 18 16:44:19 UTC 2025


On Thu, 14 Aug 2025 09:30:29 GMT, Dean Long <dlong at openjdk.org> wrote:

> This code is only needed if we forgot a call to os::thread_wx_enable_write(), right?
Yes.

> Could we enable it only for product builds? It debug builds it would be nice to know where the missing os::thread_wx_enable_write() calls are.

Now, that is a very interesting question. If we do that, then we're potentially into the "whack-a-mole" scenario David Holmes expressed disquiet about, although not in production scenarios. If we don't, then we might miss something and the consequence would be some unnecessary overhead, particularly at startup, and we might not notice.

So which do we prefer?

> Also, if this safety-net code is never triggered, it could bit-rot. How do we test it, with a stress flag?

Good point, I should do something about that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26562#discussion_r2282921913


More information about the hotspot-dev mailing list