Skip to content

Commit 677e191

Browse files
committed
Fit JIT tracing issue
1 parent 8e543da commit 677e191

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

ext/opcache/jit/zend_jit_vm_helpers.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,17 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
828828
}
829829
}
830830
break;
831-
case ZEND_FETCH_OBJ_R:
831+
case ZEND_FETCH_OBJ_R: {
832+
if (opline->op2_type == IS_CONST) {
833+
/* Remove the SIMPLE_GET flag to avoid inlining hooks. */
834+
void **cache_slot = CACHE_ADDR(opline->extended_value & ~ZEND_FETCH_REF);
835+
uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1);
836+
if (IS_HOOKED_PROPERTY_OFFSET(prop_offset)) {
837+
CACHE_PTR_EX(cache_slot + 1, (void*)((uintptr_t)CACHED_PTR_EX(cache_slot + 1) & ~ZEND_PROPERTY_HOOK_SIMPLE_GET_BIT)); \
838+
}
839+
}
840+
ZEND_FALLTHROUGH;
841+
}
832842
case ZEND_FETCH_OBJ_W:
833843
case ZEND_FETCH_OBJ_RW:
834844
case ZEND_FETCH_OBJ_IS:

0 commit comments

Comments
 (0)