Skip to content

Commit 45dac39

Browse files
committed
Prevent JIT of propery hooks in case of file caching (related to GH-15497)
1 parent fa7eb58 commit 45dac39

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
@@ -815,7 +815,10 @@ static zend_property_info *zend_persist_property_info(zend_property_info *prop)
815815
if (prop->hooks[i]) {
816816
zend_op_array *hook = zend_persist_class_method(&prop->hooks[i]->op_array, ce);
817817
#ifdef HAVE_JIT
818-
if (JIT_G(on) && JIT_G(opt_level) <= ZEND_JIT_LEVEL_OPT_FUNCS) {
818+
if (JIT_G(on)
819+
&& JIT_G(opt_level) <= ZEND_JIT_LEVEL_OPT_FUNCS
820+
&& (!ZCG(current_persistent_script)
821+
|| !ZCG(current_persistent_script)->corrupted)) {
819822
if (hook->scope == ce && !(hook->fn_flags & ZEND_ACC_TRAIT_CLONE)) {
820823
zend_jit_op_array(hook, ZCG(current_persistent_script) ? &ZCG(current_persistent_script)->script : NULL);
821824
}

0 commit comments

Comments
 (0)