Skip to content

Commit 3e6919c

Browse files
committed
Tracing JIT: Fixed possible incorrect megamorphic call from a trait
1 parent be82173 commit 3e6919c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9854,6 +9854,12 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
98549854
if (call_info && call_info->callee_func) {
98559855
func = call_info->callee_func;
98569856
}
9857+
if ((op_array->fn_flags & ZEND_ACC_TRAIT_CLONE)
9858+
&& JIT_G(current_frame)
9859+
&& JIT_G(current_frame)->call
9860+
&& !JIT_G(current_frame)->call->func) {
9861+
call_info = NULL; func = NULL; /* megamorphic call from trait */
9862+
}
98579863
}
98589864
if (!func) {
98599865
/* resolve function at run time */

0 commit comments

Comments
 (0)