From 5b51b633e2509852312328d360639dacb35d12e6 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 27 Feb 2020 23:37:41 +0300 Subject: [PATCH] Fixed incorrect overflow detection --- ext/opcache/Optimizer/zend_inference.c | 4 ++-- 1 file 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 */ -- 2.40.0