Skip to content

Commit ca613c1

Browse files
committed
Add missing hooks JIT restart code
1 parent c8cc233 commit ca613c1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

ext/opcache/jit/zend_jit.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3828,6 +3828,24 @@ static void zend_jit_restart_preloaded_script(zend_persistent_script *script)
38283828
zend_jit_restart_preloaded_op_array(op_array);
38293829
}
38303830
} ZEND_HASH_FOREACH_END();
3831+
3832+
if (ce->num_hooked_props > 0) {
3833+
zend_property_info *prop;
3834+
3835+
ZEND_HASH_MAP_FOREACH_PTR(&ce->properties_info, prop) {
3836+
if (prop->hooks) {
3837+
for (uint32_t i = 0; i < ZEND_PROPERTY_HOOK_COUNT; i++) {
3838+
if (prop->hooks[i]) {
3839+
op_array = &prop->hooks[i]->op_array;
3840+
ZEND_ASSERT(op_array->type == ZEND_USER_FUNCTION);
3841+
if (!(op_array->fn_flags & ZEND_ACC_TRAIT_CLONE)) {
3842+
zend_jit_restart_preloaded_op_array(op_array);
3843+
}
3844+
}
3845+
}
3846+
}
3847+
} ZEND_HASH_FOREACH_END();
3848+
}
38313849
} ZEND_HASH_FOREACH_END();
38323850
}
38333851

0 commit comments

Comments
 (0)