From: Dmitry Stogov Date: Mon, 29 Jun 2020 17:37:50 +0000 (+0300) Subject: Don't record "fake" closures X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ca2fd2b168cc61a0376b168e4770016fe2adfb6;p=php Don't record "fake" closures --- diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index 028219f503..5ab2129a30 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -483,7 +483,7 @@ static int zend_jit_trace_record_fake_init_call_ex(zend_execute_data *call, zend && (func->op_array.fn_flags & ZEND_ACC_CLOSURE)) { jit_extension = (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(&func->op_array); - if (UNEXPECTED(!jit_extension)) { + if (UNEXPECTED(!jit_extension || (func->op_array.fn_flags & ZEND_ACC_FAKE_CLOSURE))) { return -1; } func = (zend_function*)jit_extension->op_array; @@ -858,8 +858,8 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, && (func->op_array.fn_flags & ZEND_ACC_CLOSURE)) { jit_extension = (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(&func->op_array); - if (UNEXPECTED(!jit_extension)) { - stop = ZEND_JIT_TRACE_STOP_BAD_FUNC; + if (UNEXPECTED(!jit_extension) || (func->op_array.fn_flags & ZEND_ACC_FAKE_CLOSURE)) { + stop = ZEND_JIT_TRACE_STOP_INTERPRETER; break; } func = (zend_function*)jit_extension->op_array;