com php-src: Don't record "fake" closures: ext/opcache/jit/zend _jit_vm_helpers.c

From: Date: Thu, 23 Jul 2020 12:18:28 +0000
Subject: com php-src: Don't record "fake" closures: ext/opcache/jit/zend _jit_vm_helpers.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-112339@lists.php.net to get a copy of this message
Commit: 96a1b409df21db178a37ba09ae2ed27714443565 Author: Dmitry Stogov <dmitry@zend.com> Thu, 23 Jul 2020 15:18:28 +0300 Parents: 93594862f4530af39bcecc7bda0a2b8cdf543be5 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=96a1b409df21db178a37ba09ae2ed27714443565 Log: Don't record "fake" closures Changed paths: M ext/opcache/jit/zend_jit_vm_helpers.c Diff: diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index 0703d9e805..836629eb52 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -481,6 +481,10 @@ static int zend_jit_trace_record_fake_init_call_ex(zend_execute_data *call, zend /* TODO: Can we continue recording ??? */ return -1; } + if (func->type == ZEND_INTERNAL_FUNCTION + && (func->op_array.fn_flags & (ZEND_ACC_CLOSURE|ZEND_ACC_FAKE_CLOSURE))) { + return -1; + } if (func->type == ZEND_USER_FUNCTION && (func->op_array.fn_flags & ZEND_ACC_CLOSURE)) { jit_extension = @@ -724,6 +728,10 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, break; } if (EX(call)->func->type == ZEND_INTERNAL_FUNCTION) { + if (EX(call)->func->op_array.fn_flags & (ZEND_ACC_CLOSURE|ZEND_ACC_FAKE_CLOSURE)) { + stop = ZEND_JIT_TRACE_STOP_BAD_FUNC; + break; + } TRACE_RECORD(ZEND_JIT_TRACE_DO_ICALL, 0, EX(call)->func); } } else if (opline->opcode == ZEND_INCLUDE_OR_EVAL) { @@ -879,6 +887,11 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, break; } func = EX(call)->func; + if (func->type == ZEND_INTERNAL_FUNCTION + && (func->op_array.fn_flags & (ZEND_ACC_CLOSURE|ZEND_ACC_FAKE_CLOSURE))) { + stop = ZEND_JIT_TRACE_STOP_BAD_FUNC; + break; + } if (func->type == ZEND_USER_FUNCTION && (func->op_array.fn_flags & ZEND_ACC_CLOSURE)) { jit_extension =

« previous php.cvs (#112339) next »