<div dir="ltr"><div>Is there a plan to make the zero variant to comply with the no JIT definition from Apple? Or is it a no-go since JVM may depend heavily on this mechanism? (I'm unfamiliar with the area and would like to understand a bit more.)</div><div><br></div><div>> Sure, just wrap the call in #ifndef ZERO.</div><div><br></div><div>I tried commenting it out completely. It failed on being unable to reserve code cache. The mechanism seems to be essential.</div><div><br></div><div>> That sounds right. Even with no compiler, AArch64 HotSpot still will generate an interpreter, and that's effectively JIT as far as Apple is concerned.</div><div><br></div><div>Thank you so much. This insight is helpful.</div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Oct 6, 2025 at 10:55 AM Andrew Haley <<a href="mailto:aph-open@littlepinkcloud.com">aph-open@littlepinkcloud.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 06/10/2025 18:30, Tanin Na Nakorn wrote:<br>
> 1. Does this mean a sandboxed Java app on Mac will always require <br>
> com.apple.security.cs.allow-jit? <br>
<br>
No, it just means that no one tried it.<br>
<br>
> Is there a way around this? For <br>
> example, is there a way to avoid using pthread_jit_write_protect_np(0) <br>
> in the zero variant?<br>
<br>
Sure, just wrap the call in #ifndef ZERO.<br>
<br>
> 2. It seems like the term JIT has different meanings for Java and Apple <br>
> where, for Java, it means not to use compiler1 and compiler 2. But, for <br>
> Mac, it means something else e.g. never use <br>
> pthread_jit_write_protect_np(0) and generate code.<br>
<br>
That sounds right. Even with no compiler, AArch64 HotSpot still will <br>
generate an interpreter, and that's effectively JIT as far as Apple is <br>
concerned.<br>
<br>
-- <br>
Andrew Haley  (he/him)<br>
Java Platform Lead Engineer<br>
<a href="https://keybase.io/andrewhaley" rel="noreferrer" target="_blank">https://keybase.io/andrewhaley</a><br>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671<br>
</blockquote></div>