Skip to content

Commit cc08ba8

Browse files
committed
Fix addess sanitizer warnings
1 parent 1411264 commit cc08ba8

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ext/opcache/jit/zend_jit_ir.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -555,9 +555,11 @@ void *zend_jit_snapshot_handler(ir_ctx *ctx, ir_ref snapshot_ref, ir_insn *snaps
555555
ZEND_ASSERT(exit_point < t->exit_count);
556556

557557
if (t->exit_info[exit_point].flags & ZEND_JIT_EXIT_METHOD_CALL) {
558-
ZEND_ASSERT(ctx->regs[snapshot_ref][n - 1] != -1 && ctx->regs[snapshot_ref][n] != -1);
559-
t->exit_info[exit_point].poly_func_reg = ctx->regs[snapshot_ref][n - 1];
560-
t->exit_info[exit_point].poly_this_reg = ctx->regs[snapshot_ref][n];
558+
int8_t *reg_ops = ctx->regs[snapshot_ref];
559+
560+
ZEND_ASSERT(reg_ops[n - 1] != -1 && reg_ops[n] != -1);
561+
t->exit_info[exit_point].poly_func_reg = reg_ops[n - 1];
562+
t->exit_info[exit_point].poly_this_reg = reg_ops[n];
561563
n -= 2;
562564
}
563565

0 commit comments

Comments
 (0)