Skip to content

Commit 034bd85

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix incorrect conditions
2 parents 9ac59d0 + 48ae025 commit 034bd85

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/opcache/jit/zend_jit_trace.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,7 +2209,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin
22092209
assert(0);
22102210
}
22112211
if (opline->opcode == ZEND_ASSIGN_DIM_OP
2212-
&& ssa_ops[idx].op1_def > 0
2212+
&& ssa_ops[idx].op1_def >= 0
22132213
&& op1_type == IS_ARRAY
22142214
&& (orig_op1_type & IS_TRACE_PACKED)
22152215
&& val_type != IS_UNKNOWN
@@ -5037,7 +5037,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
50375037
zend_may_throw_ex(opline, ssa_op, op_array, ssa, op1_info, op2_info))) {
50385038
goto jit_failure;
50395039
}
5040-
if (ssa_op->op2_def > 0
5040+
if (ssa_op->op2_def >= 0
50415041
&& Z_MODE(op2_addr) == IS_REG
50425042
&& ssa->vars[ssa_op->op2_def].no_val) {
50435043
uint8_t type = (op2_info & MAY_BE_LONG) ? IS_LONG : IS_DOUBLE;
@@ -5087,7 +5087,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
50875087
res_use_info, res_info, res_addr)) {
50885088
goto jit_failure;
50895089
}
5090-
if (ssa_op->op1_def > 0
5090+
if (ssa_op->op1_def >= 0
50915091
&& Z_MODE(op1_addr) == IS_REG
50925092
&& ssa->vars[ssa_op->op1_def].no_val) {
50935093
uint8_t type = (op1_info & MAY_BE_LONG) ? IS_LONG : IS_DOUBLE;
@@ -5184,7 +5184,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
51845184
op1_info, op1_addr, op1_def_addr)) {
51855185
goto jit_failure;
51865186
}
5187-
if (ssa_op->op1_def > 0
5187+
if (ssa_op->op1_def >= 0
51885188
&& Z_MODE(op1_addr) == IS_REG
51895189
&& ssa->vars[ssa_op->op1_def].no_val) {
51905190
uint8_t type = (op1_info & MAY_BE_LONG) ? IS_LONG : IS_DOUBLE;
@@ -5734,7 +5734,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
57345734
op1_info, op1_addr, op2_info, RES_REG_ADDR(), val_type)) {
57355735
goto jit_failure;
57365736
}
5737-
if (ssa_op->result_def > 0
5737+
if (ssa_op->result_def >= 0
57385738
&& (opline->opcode == ZEND_FETCH_DIM_W || opline->opcode == ZEND_FETCH_LIST_W)
57395739
&& !(op1_info & (MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_STRING|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF))
57405740
&& !(op2_info & (MAY_BE_UNDEF|MAY_BE_RESOURCE|MAY_BE_ARRAY|MAY_BE_OBJECT))) {

0 commit comments

Comments
 (0)