diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-12-02 15:06:30 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-12-02 16:51:50 +0100 |
commit | 72cd5793beea990af7b13013f50e91a6ea45c728 (patch) | |
tree | 8a82e1b53ed44f5e50e10ceba6ec491360909670 | |
parent | 9dda22bd1e4568cde1114e0d80c39ce211e15025 (diff) | |
download | php-git-72cd5793beea990af7b13013f50e91a6ea45c728.tar.gz |
Fix failing VirtualProtect() calls
Whenever JIT is disabled due to incompatibilities, we also need to set
`JIT_G(on)` to zero.
Closes GH-6470.
-rw-r--r-- | ext/opcache/jit/zend_jit.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; } } |