com php-src: Clear result type for exit point caused by JMPZ_EX/NZ_EX: ext/opcache/jit/zend_jit_trace.c

From: Date: Thu, 30 Jul 2020 14:01:08 +0000
Subject: com php-src: Clear result type for exit point caused by JMPZ_EX/NZ_EX: ext/opcache/jit/zend_jit_trace.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-112460@lists.php.net to get a copy of this message
Commit: 28eaad096933d050559bee41e5790dd595c6988e Author: Dmitry Stogov <dmitry@zend.com> Thu, 30 Jul 2020 17:01:08 +0300 Parents: 8b4397648371816bba3ba35c70aa2f2734d5a5e2 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=28eaad096933d050559bee41e5790dd595c6988e Log: Clear result type for exit point caused by JMPZ_EX/NZ_EX Changed paths: M ext/opcache/jit/zend_jit_trace..c Diff: diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 8d47f26d4e..f668e5b725 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -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;

« previous php.cvs (#112460) next »