From aa179bf3dd27f0f9c85b3f61a2de23f863b48061 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 29 Sep 2022 15:27:38 +0300 Subject: [PATCH] Force exit to VM --- ext/opcache/jit/zend_jit_x86.dasc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 6c59cd54642..a692b3056e4 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -3617,11 +3617,13 @@ static int zend_jit_trace_handler(dasm_State **Dst, const zend_op_array *op_arra opline->opcode == ZEND_GENERATOR_CREATE) { if (zend_jit_vm_kind == ZEND_VM_KIND_HYBRID) { -#if 0 - /* this check should be handled by the following OPLINE guard or jmp [IP] */ - | cmp IP, zend_jit_halt_op - | je ->trace_halt -#endif + if (trace->op != ZEND_JIT_TRACE_END || + (trace->stop != ZEND_JIT_TRACE_STOP_RETURN && + trace->stop != ZEND_JIT_TRACE_STOP_INTERPRETER)) { + /* this check may be handled by the following OPLINE guard or jmp [IP] */ + | cmp IP, zend_jit_halt_op + | je ->trace_halt + } } else if (GCC_GLOBAL_REGS) { | test IP, IP | je ->trace_halt