Skip to content

Commit

Permalink
Clear result type for exit point caused by JMPZ_EX/NZ_EX
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Jul 30, 2020
1 parent 8b43976 commit 28eaad0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ext/opcache/jit/zend_jit_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -3861,7 +3861,16 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
if (ra) {
zend_jit_trace_clenup_stack(stack, opline, ssa_op, ssa, ra);
}
exit_point = zend_jit_trace_get_exit_point(opline, exit_opline, p+1, 0);
if (opline->result_type == IS_TMP_VAR) {
zend_jit_trace_stack *stack = JIT_G(current_frame)->stack;
uint32_t old_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, p+1, 0);
SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var), old_info);
} else {
exit_point = zend_jit_trace_get_exit_point(opline, exit_opline, p+1, 0);
}
exit_addr = zend_jit_trace_get_exit_addr(exit_point);
if (!exit_addr) {
goto jit_failure;
Expand Down

0 comments on commit 28eaad0

Please sign in to comment.