Skip to content

Commit

Permalink
Tracing JIT: Fixed possible incorrect megamorphic call from a trait
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Sep 23, 2021
1 parent be82173 commit 3e6919c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ext/opcache/jit/zend_jit_x86.dasc
Original file line number Diff line number Diff line change
Expand Up @@ -9854,6 +9854,12 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
if (call_info && call_info->callee_func) {
func = call_info->callee_func;
}
if ((op_array->fn_flags & ZEND_ACC_TRAIT_CLONE)
&& JIT_G(current_frame)
&& JIT_G(current_frame)->call
&& !JIT_G(current_frame)->call->func) {
call_info = NULL; func = NULL; /* megamorphic call from trait */
}
}
if (!func) {
/* resolve function at run time */
Expand Down

0 comments on commit 3e6919c

Please sign in to comment.