@@ -105,7 +105,7 @@ ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_leave_top_func_helper(ZEND_OPCODE
105105#ifdef HAVE_GCC_GLOBAL_REGS
106106 opline = zend_jit_halt_op ;
107107#else
108- return NULL ; // ZEND_VM_RETURN
108+ return ( const zend_op * ) ZEND_VM_RETURN_VAL ; // ZEND_VM_RETURN
109109#endif
110110}
111111
@@ -364,15 +364,15 @@ static zend_always_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_trace_c
364364 opline = NULL ;
365365 return ;
366366#else
367- return NULL ; // ZEND_VM_RETURN()
367+ return ( const zend_op * ) ZEND_VM_RETURN_VAL ; // ZEND_VM_RETURN()
368368#endif
369369 }
370370 execute_data = EG (current_execute_data );
371371 opline = execute_data ? EX (opline ) : NULL ;
372372#ifdef HAVE_GCC_GLOBAL_REGS
373373 return ;
374374#else
375- return opline ? ( zend_op * )((uintptr_t )opline | ZEND_VM_ENTER_BIT ) : NULL ; // ZEND_VM_ENTER() : ZEND_VM_RETURN()
375+ return ( const zend_op * )((uintptr_t )opline | ZEND_VM_ENTER_BIT ); // ZEND_VM_ENTER() / ZEND_VM_RETURN()
376376#endif
377377 } else {
378378 zend_vm_opcode_handler_t handler = (zend_vm_opcode_handler_t )ZEND_OP_TRACE_INFO (opline , offset )-> orig_handler ;
@@ -942,7 +942,12 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
942942 if (UNEXPECTED (execute_data != prev_execute_data )) {
943943#else
944944 opline = handler (ZEND_OPCODE_HANDLER_ARGS_PASSTHRU );
945+ # ifdef ZEND_HIGH_HALF_KERNEL
945946 if ((intptr_t )opline <= 0 ) {
947+ # else
948+ if ((uintptr_t )opline & ZEND_VM_ENTER_BIT ) {
949+ # endif
950+ opline = (const zend_op * )((uintptr_t )opline & ~ZEND_VM_ENTER_BIT );
946951 if (opline == NULL ) {
947952 stop = ZEND_JIT_TRACE_STOP_RETURN ;
948953 opline = NULL ;
@@ -952,7 +957,6 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
952957 /* return after interrupt handler */
953958 ZEND_ASSERT (0 && "TODO" );
954959 }
955- opline = (zend_op * )((uintptr_t )opline & ~ZEND_VM_ENTER_BIT );
956960 execute_data = EG (current_execute_data );
957961#endif
958962
0 commit comments