Skip to content

Commit 72cd579

Browse files
committed
Fix failing VirtualProtect() calls
Whenever JIT is disabled due to incompatibilities, we also need to set `JIT_G(on)` to zero. Closes GH-6470.
1 parent 9dda22b commit 72cd579

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/opcache/jit/zend_jit.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4175,6 +4175,7 @@ ZEND_EXT_API int zend_jit_check_support(void)
41754175
zend_jit_vm_kind != ZEND_VM_KIND_HYBRID) {
41764176
zend_error(E_WARNING, "JIT is compatible only with CALL and HYBRID VM. JIT disabled.");
41774177
JIT_G(enabled) = 0;
4178+
JIT_G(on) = 0;
41784179
return FAILURE;
41794180
}
41804181

@@ -4183,13 +4184,15 @@ ZEND_EXT_API int zend_jit_check_support(void)
41834184
zend_error(E_WARNING, "JIT is incompatible with third party extensions that override zend_execute_ex(). JIT disabled.");
41844185
}
41854186
JIT_G(enabled) = 0;
4187+
JIT_G(on) = 0;
41864188
return FAILURE;
41874189
}
41884190

41894191
for (i = 0; i <= 256; i++) {
41904192
if (zend_get_user_opcode_handler(i) != NULL) {
41914193
zend_error(E_WARNING, "JIT is incompatible with third party extensions that setup user opcode handlers. JIT disabled.");
41924194
JIT_G(enabled) = 0;
4195+
JIT_G(on) = 0;
41934196
return FAILURE;
41944197
}
41954198
}

0 commit comments

Comments
 (0)