Skip to content

Commit 6f01fd9

Browse files
committed
IR JIT: Fixed inaccurate range inference usage for UNDEF/NULL/FALSE
1 parent 395e5bf commit 6f01fd9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/opcache/jit/zend_jit_ir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5198,7 +5198,7 @@ static int zend_jit_long_math_helper(zend_jit_ctx *jit,
51985198
ir_ref zero_path = 0;
51995199

52005200
ref = jit_Z_LVAL(jit, op2_addr);
5201-
if (!op2_range || (op2_range->min <= 0 && op2_range->max >= 0)) {
5201+
if ((op2_type & (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE)) || !op2_range || (op2_range->min <= 0 && op2_range->max >= 0)) {
52025202
ir_ref if_ok = ir_IF(ref);
52035203
ir_IF_FALSE(if_ok);
52045204
jit_SET_EX_OPLINE(jit, opline);

0 commit comments

Comments
 (0)