From 713d3ea4e64b18ceddb6b6d88d2983bb7b977402 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 30 Jul 2020 00:31:46 +0300 Subject: [PATCH] Don't skip fcall guard for method calls from trait --- ext/opcache/jit/zend_jit_trace.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 71adacaa0c..8d47f26d4e 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -4549,6 +4549,14 @@ done: while (call_info) { if (call_info->caller_init_opline == init_opline) { + if (op_array->fn_flags & ZEND_ACC_TRAIT_CLONE) { + if (init_opline->opcode == ZEND_INIT_STATIC_METHOD_CALL + && init_opline->op1_type != IS_CONST) { + break; + } else if (init_opline->opcode == ZEND_INIT_METHOD_CALL) { + break; + } + } skip_guard = 1; break; } -- 2.50.1