From 72cd5793beea990af7b13013f50e91a6ea45c728 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 2 Dec 2020 15:06:30 +0100 Subject: [PATCH] Fix failing VirtualProtect() calls Whenever JIT is disabled due to incompatibilities, we also need to set `JIT_G(on)` to zero. Closes GH-6470. --- ext/opcache/jit/zend_jit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index bcba053d16..49ff973d1a 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -4175,6 +4175,7 @@ ZEND_EXT_API int zend_jit_check_support(void) zend_jit_vm_kind != ZEND_VM_KIND_HYBRID) { zend_error(E_WARNING, "JIT is compatible only with CALL and HYBRID VM. JIT disabled."); JIT_G(enabled) = 0; + JIT_G(on) = 0; return FAILURE; } @@ -4183,6 +4184,7 @@ ZEND_EXT_API int zend_jit_check_support(void) zend_error(E_WARNING, "JIT is incompatible with third party extensions that override zend_execute_ex(). JIT disabled."); } JIT_G(enabled) = 0; + JIT_G(on) = 0; return FAILURE; } @@ -4190,6 +4192,7 @@ ZEND_EXT_API int zend_jit_check_support(void) if (zend_get_user_opcode_handler(i) != NULL) { zend_error(E_WARNING, "JIT is incompatible with third party extensions that setup user opcode handlers. JIT disabled."); JIT_G(enabled) = 0; + JIT_G(on) = 0; return FAILURE; } } -- 2.40.0