Skip to content

Commit 17e313e

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix GH-15497: Opcache with file_cache and JIT enabled crashes (#15635)
2 parents 0e9e591 + fd42cdb commit 17e313e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/opcache/zend_persist.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,10 @@ static void zend_persist_op_array(zval *zv)
692692
}
693693
}
694694
#ifdef HAVE_JIT
695-
if (JIT_G(on) && JIT_G(opt_level) <= ZEND_JIT_LEVEL_OPT_FUNCS) {
695+
if (JIT_G(on)
696+
&& JIT_G(opt_level) <= ZEND_JIT_LEVEL_OPT_FUNCS
697+
&& (!ZCG(current_persistent_script)
698+
|| !ZCG(current_persistent_script)->corrupted)) {
696699
zend_jit_op_array(op_array, ZCG(current_persistent_script) ? &ZCG(current_persistent_script)->script : NULL);
697700
}
698701
#endif

0 commit comments

Comments
 (0)