summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2020-02-27 23:37:41 +0300
committerDmitry Stogov <dmitry@zend.com>2020-02-27 23:37:41 +0300
commit5b51b633e2509852312328d360639dacb35d12e6 (patch)
tree0e6e04232e1ca7d984286050e7323043de29b56c
parent49762c84e09c7b4287444bfa394f0147b9ada024 (diff)
downloadphp-git-5b51b633e2509852312328d360639dacb35d12e6.tar.gz
Fixed incorrect overflow detection
-rw-r--r--ext/opcache/Optimizer/zend_inference.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c
index 961740bd5c..7bddb82705 100644
--- a/ext/opcache/Optimizer/zend_inference.c
+++ b/ext/opcache/Optimizer/zend_inference.c
@@ -2626,10 +2626,10 @@ static int zend_update_type_info(const zend_op_array *op_array,
}
if ((t1 & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_LONG) {
if (!ssa_var_info[ssa_ops[i].op1_use].has_range ||
- (opline->opcode == ZEND_PRE_DEC &&
+ (opline->opcode == ZEND_POST_DEC &&
(ssa_var_info[ssa_ops[i].op1_use].range.underflow ||
ssa_var_info[ssa_ops[i].op1_use].range.min == ZEND_LONG_MIN)) ||
- (opline->opcode == ZEND_PRE_INC &&
+ (opline->opcode == ZEND_POST_INC &&
(ssa_var_info[ssa_ops[i].op1_use].range.overflow ||
ssa_var_info[ssa_ops[i].op1_use].range.max == ZEND_LONG_MAX))) {
/* may overflow */