Skip to content

Commit 5b51b63

Browse files
committed
Fixed incorrect overflow detection
1 parent 49762c8 commit 5b51b63

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
@@ -2626,10 +2626,10 @@ static int zend_update_type_info(const zend_op_array *op_array,
26262626
}
26272627
if ((t1 & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_LONG) {
26282628
if (!ssa_var_info[ssa_ops[i].op1_use].has_range ||
2629-
(opline->opcode == ZEND_PRE_DEC &&
2629+
(opline->opcode == ZEND_POST_DEC &&
26302630
(ssa_var_info[ssa_ops[i].op1_use].range.underflow ||
26312631
ssa_var_info[ssa_ops[i].op1_use].range.min == ZEND_LONG_MIN)) ||
2632-
(opline->opcode == ZEND_PRE_INC &&
2632+
(opline->opcode == ZEND_POST_INC &&
26332633
(ssa_var_info[ssa_ops[i].op1_use].range.overflow ||
26342634
ssa_var_info[ssa_ops[i].op1_use].range.max == ZEND_LONG_MAX))) {
26352635
/* may overflow */

0 commit comments

Comments
 (0)