1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00

Tracing JIT: Fixed possible incorrect megamorphic call from a trait

This commit is contained in:
Dmitry Stogov
2021-09-23 23:38:03 +03:00
parent be8217368b
commit 3e6919cfb3

View File

@@ -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 */