<div dir="ltr">Hello all,<div><br></div><div>I was building a Java app on Mac (aarch64) and trying to find a way to avoid com.apple.security.cs.allow-jit using the zero-variant JDK 21, which doesn't use JIT.</div><div><br></div><div>I've found that pthread_jit_write_protect_np(0) (invoked in threads.cpp, line 430, through os::current_thread_enable_wx(WXWrite)) crashes if com.apple.security.cs.allow-jit isn't enabled. It seems this method is called regardless of the variant.</div><div><br></div><div>I have a few questions around this:</div><div><br></div><div>1. Does this mean a sandboxed Java app on Mac will always require com.apple.security.cs.allow-jit? Is there a way around this? For example, is there a way to avoid using pthread_jit_write_protect_np(0) in the zero variant?</div><div><br></div><div>2. It seems like the term JIT has different meanings for Java and Apple where, for Java, it means not to use compiler1 and compiler 2. But, for Mac, it means something else e.g. never use pthread_jit_write_protect_np(0) and generate code.</div><div><br></div><div>I'm still new to all this, so I might misunderstand something. Would love some insights around this area.</div><div><br></div><div>Thank you so much!</div><font color="#888888"><div>Tanin</div></font></div>