Skip to content

Commit 63761d1

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fixed incorrect overflow detection
2 parents 819a872 + cb88184 commit 63761d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/opcache/Optimizer/zend_inference.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2725,10 +2725,10 @@ static int zend_update_type_info(const zend_op_array *op_array,
27252725
}
27262726
if ((t1 & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_LONG) {
27272727
if (!ssa_var_info[ssa_ops[i].op1_use].has_range ||
2728-
(opline->opcode == ZEND_PRE_DEC &&
2728+
(opline->opcode == ZEND_POST_DEC &&
27292729
(ssa_var_info[ssa_ops[i].op1_use].range.underflow ||
27302730
ssa_var_info[ssa_ops[i].op1_use].range.min == ZEND_LONG_MIN)) ||
2731-
(opline->opcode == ZEND_PRE_INC &&
2731+
(opline->opcode == ZEND_POST_INC &&
27322732
(ssa_var_info[ssa_ops[i].op1_use].range.overflow ||
27332733
ssa_var_info[ssa_ops[i].op1_use].range.max == ZEND_LONG_MAX))) {
27342734
/* may overflow */

0 commit comments

Comments
 (0)