Skip to content

Commit d28b75f

Browse files
authored
Fix GH-15497: Opcache with file_cache and JIT enabled crashes (#15635)
1 parent 7e1e450 commit d28b75f

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
@@ -693,7 +693,10 @@ static void zend_persist_op_array(zval *zv)
693693
}
694694
}
695695
#ifdef HAVE_JIT
696-
if (JIT_G(on) && JIT_G(opt_level) <= ZEND_JIT_LEVEL_OPT_FUNCS) {
696+
if (JIT_G(on)
697+
&& JIT_G(opt_level) <= ZEND_JIT_LEVEL_OPT_FUNCS
698+
&& (!ZCG(current_persistent_script)
699+
|| !ZCG(current_persistent_script)->corrupted)) {
697700
zend_jit_op_array(op_array, ZCG(current_persistent_script) ? &ZCG(current_persistent_script)->script : NULL);
698701
}
699702
#endif

0 commit comments

Comments
 (0)