@@ -594,15 +594,6 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
594
594
#endif
595
595
zend_execute_data * prev_call = EX (call );
596
596
597
- if (UNEXPECTED (opline -> opcode == ZEND_HANDLE_EXCEPTION )) {
598
- /* Abort trace because of exception */
599
- #ifdef HAVE_GCC_GLOBAL_REGS
600
- execute_data = save_execute_data ;
601
- opline = save_opline ;
602
- #endif
603
- return ZEND_JIT_TRACE_STOP_EXCEPTION ;
604
- }
605
-
606
597
orig_opline = opline ;
607
598
608
599
op_array = & EX (func )-> op_array ;
@@ -616,9 +607,20 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
616
607
617
608
TRACE_START (ZEND_JIT_TRACE_START , start , op_array , opline );
618
609
610
+ if (UNEXPECTED (opline -> opcode == ZEND_HANDLE_EXCEPTION )) {
611
+ /* Abort trace because of exception */
612
+ TRACE_END (ZEND_JIT_TRACE_END , ZEND_JIT_TRACE_STOP_EXCEPTION , opline );
613
+ #ifdef HAVE_GCC_GLOBAL_REGS
614
+ execute_data = save_execute_data ;
615
+ opline = save_opline ;
616
+ #endif
617
+ return ZEND_JIT_TRACE_STOP_EXCEPTION ;
618
+ }
619
+
619
620
if (prev_call ) {
620
621
int ret = zend_jit_trace_record_fake_init_call (prev_call , trace_buffer , idx , is_megamorphic , & megamorphic , ret_level + level );
621
622
if (ret < 0 ) {
623
+ TRACE_END (ZEND_JIT_TRACE_END , ZEND_JIT_TRACE_STOP_BAD_FUNC , opline );
622
624
#ifdef HAVE_GCC_GLOBAL_REGS
623
625
execute_data = save_execute_data ;
624
626
opline = save_opline ;
0 commit comments