@@ -4110,7 +4110,8 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
4110
4110
}
4111
4111
t -> link = zend_jit_find_trace (p -> opline -> handler );
4112
4112
zend_jit_trace_link_to_root (& dasm_state , & zend_jit_traces [t -> link ]);
4113
- } else if (p -> stop == ZEND_JIT_TRACE_STOP_RETURN ) {
4113
+ } else if (p -> stop == ZEND_JIT_TRACE_STOP_RETURN
4114
+ || p -> stop == ZEND_JIT_TRACE_STOP_RETURN_HALT ) {
4114
4115
zend_jit_trace_return (& dasm_state , 0 );
4115
4116
} else {
4116
4117
// TODO: not implemented ???
@@ -4659,6 +4660,7 @@ int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const
4659
4660
{
4660
4661
const zend_op * orig_opline ;
4661
4662
zend_jit_trace_stop stop ;
4663
+ int ret = 0 ;
4662
4664
zend_op_array * op_array ;
4663
4665
zend_jit_op_array_trace_extension * jit_extension ;
4664
4666
size_t offset ;
@@ -4706,6 +4708,9 @@ int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const
4706
4708
}
4707
4709
4708
4710
if (ZEND_JIT_TRACE_STOP_OK (stop )) {
4711
+ if (stop == ZEND_JIT_TRACE_STOP_RETURN_HALT ) {
4712
+ ret = -1 ;
4713
+ }
4709
4714
if (JIT_G (debug ) & ZEND_JIT_DEBUG_TRACE_STOP ) {
4710
4715
if (stop == ZEND_JIT_TRACE_STOP_LINK ) {
4711
4716
uint32_t idx = trace_buffer [1 ].last ;
@@ -4730,6 +4735,9 @@ int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const
4730
4735
goto abort ;
4731
4736
}
4732
4737
} else {
4738
+ if (stop == ZEND_JIT_TRACE_STOP_HALT ) {
4739
+ ret = -1 ;
4740
+ }
4733
4741
abort :
4734
4742
if (JIT_G (debug ) & ZEND_JIT_DEBUG_TRACE_ABORT ) {
4735
4743
fprintf (stderr , "---- TRACE %d abort (%s)\n" ,
@@ -4755,7 +4763,7 @@ int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const
4755
4763
fprintf (stderr , "\n" );
4756
4764
}
4757
4765
4758
- return ( stop == ZEND_JIT_TRACE_STOP_HALT ) ? -1 : 0 ;
4766
+ return ret ;
4759
4767
}
4760
4768
4761
4769
static void zend_jit_blacklist_trace_exit (uint32_t trace_num , uint32_t exit_num )
@@ -4929,6 +4937,7 @@ static zend_jit_trace_stop zend_jit_compile_side_trace(zend_jit_trace_rec *trace
4929
4937
int ZEND_FASTCALL zend_jit_trace_hot_side (zend_execute_data * execute_data , uint32_t parent_num , uint32_t exit_num )
4930
4938
{
4931
4939
zend_jit_trace_stop stop ;
4940
+ int ret = 0 ;
4932
4941
uint32_t trace_num ;
4933
4942
zend_jit_trace_rec trace_buffer [ZEND_JIT_TRACE_MAX_LENGTH ];
4934
4943
@@ -4965,6 +4974,9 @@ int ZEND_FASTCALL zend_jit_trace_hot_side(zend_execute_data *execute_data, uint3
4965
4974
}
4966
4975
4967
4976
if (ZEND_JIT_TRACE_STOP_OK (stop )) {
4977
+ if (stop == ZEND_JIT_TRACE_STOP_RETURN_HALT ) {
4978
+ ret = -1 ;
4979
+ }
4968
4980
if (JIT_G (debug ) & ZEND_JIT_DEBUG_TRACE_STOP ) {
4969
4981
if (stop == ZEND_JIT_TRACE_STOP_LINK ) {
4970
4982
uint32_t idx = trace_buffer [1 ].last ;
@@ -4998,6 +5010,9 @@ int ZEND_FASTCALL zend_jit_trace_hot_side(zend_execute_data *execute_data, uint3
4998
5010
goto abort ;
4999
5011
}
5000
5012
} else {
5013
+ if (stop == ZEND_JIT_TRACE_STOP_HALT ) {
5014
+ ret = -1 ;
5015
+ }
5001
5016
abort :
5002
5017
if (JIT_G (debug ) & ZEND_JIT_DEBUG_TRACE_ABORT ) {
5003
5018
fprintf (stderr , "---- TRACE %d abort (%s)\n" ,
@@ -5018,7 +5033,7 @@ int ZEND_FASTCALL zend_jit_trace_hot_side(zend_execute_data *execute_data, uint3
5018
5033
fprintf (stderr , "\n" );
5019
5034
}
5020
5035
5021
- return ( stop == ZEND_JIT_TRACE_STOP_HALT ) ? -1 : 0 ;
5036
+ return ret ;
5022
5037
}
5023
5038
5024
5039
int ZEND_FASTCALL zend_jit_trace_exit (uint32_t exit_num , zend_jit_registers_buf * regs )
0 commit comments