Skip to content

Commit 3d4e23a

Browse files
committed
Fixed crash if jit.trigger is counter based with preload scripts
1 parent f150b02 commit 3d4e23a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/opcache/zend_persist.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,9 @@ zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script
11441144

11451145
#ifdef HAVE_JIT
11461146
if (ZCG(jit_enabled) && for_shm) {
1147-
if (ZEND_JIT_LEVEL(ZCG(accel_directives).jit) >= ZEND_JIT_LEVEL_OPT_SCRIPT) {
1147+
if (ZEND_JIT_LEVEL(ZCG(accel_directives).jit) >= ZEND_JIT_LEVEL_OPT_SCRIPT &&
1148+
(ZEND_JIT_TRIGGER(ZCG(accel_directives).jit) == ZEND_JIT_ON_SCRIPT_LOAD ||
1149+
ZEND_JIT_TRIGGER(ZCG(accel_directives).jit) == ZEND_JIT_ON_DOC_COMMENT)) {
11481150
zend_jit_script(&script->script);
11491151
}
11501152
zend_jit_protect();

0 commit comments

Comments
 (0)