Uh oh!
There was an error while loading. Please reload this page.
re-enable JIT for ZTS builds on Apple Silicon - #22712
Conversation
henderkes
commented
Jul 13, 2026
I don't know if this was in response to my mail, but thank you 😄 |
realFlowControl
commented
Jul 13, 2026
Actually yes, haha. I knew that this should work, I just was not working on it and then reading your mail reminded me of it 👍 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
arnaud-lb
commented
Jul 15, 2026
Thank you @realFlowControl! |
Related: phpGH-22712 Co-authored-by: Florian Engelhardt <florian.engelhardt@datadoghq.com>
iluuu1994
commented
Jul 21, 2026
This change is problematic for CI. I.e. it makes all the tests with an explicit Normally opcache would just log something with |
realFlowControl
commented
Jul 21, 2026
Ah I see. Yeah I think that should work, I have a look and keep you posted. |
Fixes#13400
For
__APPLE__ && __aarch64__ && ZTS, this PR moves the JIT buffer out of the OPcache shared memory and creates a dedicated mapping.Background
OPcache JIT is currently disabled for ZTS builds on Apple Silicon. The JIT buffer normally lives at the end of OPcache's
MAP_SHARED | MAP_ANONallocation. In ZTS, one thread may generate code while another executes existing code, so the buffer must remain executable while it is writable.Apple Silicon rejects RWX anonymous mappings with
EPERM. Apple's supported solution isMAP_JITwithpthread_jit_write_protect_np(), which provides per-thread write protection, but macOS rejectsMAP_JIT | MAP_SHAREDwithEINVAL. The existing combined OPcache/JIT mapping won't work on Apple Silicon.