Skip to content

Commit 1ca2fd2

Browse files
committed
Don't record "fake" closures
1 parent 07ff243 commit 1ca2fd2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/opcache/jit/zend_jit_vm_helpers.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ static int zend_jit_trace_record_fake_init_call_ex(zend_execute_data *call, zend
483483
&& (func->op_array.fn_flags & ZEND_ACC_CLOSURE)) {
484484
jit_extension =
485485
(zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(&func->op_array);
486-
if (UNEXPECTED(!jit_extension)) {
486+
if (UNEXPECTED(!jit_extension || (func->op_array.fn_flags & ZEND_ACC_FAKE_CLOSURE))) {
487487
return -1;
488488
}
489489
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,
858858
&& (func->op_array.fn_flags & ZEND_ACC_CLOSURE)) {
859859
jit_extension =
860860
(zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(&func->op_array);
861-
if (UNEXPECTED(!jit_extension)) {
862-
stop = ZEND_JIT_TRACE_STOP_BAD_FUNC;
861+
if (UNEXPECTED(!jit_extension) || (func->op_array.fn_flags & ZEND_ACC_FAKE_CLOSURE)) {
862+
stop = ZEND_JIT_TRACE_STOP_INTERPRETER;
863863
break;
864864
}
865865
func = (zend_function*)jit_extension->op_array;

0 commit comments

Comments
 (0)