Skip to content

Commit fd42cdb

Browse files
committed
Fix GH-15497: Opcache with file_cache and JIT enabled crashes (#15635)
1 parent 4db7814 commit fd42cdb

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
@@ -689,7 +689,10 @@ static void zend_persist_op_array(zval *zv)
689689
}
690690
}
691691
#ifdef HAVE_JIT
692-
if (JIT_G(on) && JIT_G(opt_level) <= ZEND_JIT_LEVEL_OPT_FUNCS) {
692+
if (JIT_G(on)
693+
&& JIT_G(opt_level) <= ZEND_JIT_LEVEL_OPT_FUNCS
694+
&& (!ZCG(current_persistent_script)
695+
|| !ZCG(current_persistent_script)->corrupted)) {
693696
zend_jit_op_array(op_array, ZCG(current_persistent_script) ? &ZCG(current_persistent_script)->script : NULL);
694697
}
695698
#endif

0 commit comments

Comments
 (0)