From: Dmitry Stogov Date: Fri, 24 Jul 2020 10:26:03 +0000 (+0300) Subject: Result of branching opcode in side trace is unknown X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ef8e0c1156003a4a673518e3034118e314f2691;p=php Result of branching opcode in side trace is unknown --- diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 0100e18725..8c446a133e 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -3288,6 +3288,7 @@ static int zend_jit_trace_handler(dasm_State **Dst, const zend_op_array *op_arra uint32_t exit_point; const void *exit_addr; uint32_t old_info = 0; + uint32_t old_res_info = 0; zend_jit_trace_stack *stack = JIT_G(current_frame)->stack; if (zend_is_smart_branch(opline)) { @@ -3326,9 +3327,16 @@ static int zend_jit_trace_handler(dasm_State **Dst, const zend_op_array *op_arra } } + if (opline->result_type == IS_VAR || opline->result_type == IS_TMP_VAR) { + old_res_info = STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var)); + SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var), IS_UNKNOWN); + } exit_point = zend_jit_trace_get_exit_point(opline, exit_opline, trace, 0); exit_addr = zend_jit_trace_get_exit_addr(exit_point); + if (opline->result_type == IS_VAR || opline->result_type == IS_TMP_VAR) { + SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var), old_res_info); + } switch (opline->opcode) { case ZEND_FE_FETCH_R: case ZEND_FE_FETCH_RW: