com php-src: Fixed incorrect invariant guard motion: ext/opcache/jit/zend_jit_trace.c
| From: | Dmitry Stogov | Date: | Thu, 05 Nov 2020 15:32:00 +0000 |
| Subject: | com php-src: Fixed incorrect invariant guard motion: ext/opcache/jit/zend_jit_trace.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-114073@lists.php.net to get a copy of this message | ||
Commit: ff91800602930953d1a4533127e9807541e7d759
Author: Dmitry Stogov <dmitry@zend.com> Thu, 5 Nov 2020 18:32:00 +0300
Parents: 2effbfd8713936742ef46e6e85ce193b320ac005
Branches: PHP-8.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ff91800602930953d1a4533127e9807541e7d759
Log:
Fixed incorrect invariant guard motion
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 7e053f5cda2..27362312e54 100644
--- a/ext/opcache/jit/zend_jit_trace.c
+++ b/ext/opcache/jit/zend_jit_trace.c
@@ -3488,7 +3488,9 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t
par
} else if ((info & MAY_BE_GUARD) != 0
&& (trace_buffer->stop == ZEND_JIT_TRACE_STOP_LOOP
|| trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_CALL
- || trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET)
+ || (trace_buffer->stop == ZEND_JIT_TRACE_STOP_RECURSIVE_RET
+ && (opline-1)->result_type == IS_VAR
+ && EX_VAR_TO_NUM((opline-1)->result.var) == i))
&& (ssa->vars[i].use_chain != -1
|| (ssa->vars[i].phi_use_chain
&& !(ssa->var_info[ssa->vars[i].phi_use_chain->ssa_var].type &
MAY_BE_GUARD)))) {