From: Mike Pall Date: Mon, 11 Dec 2023 12:04:43 +0000 (+0100) Subject: Merge branch 'master' into v2.1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=29b0b282f59ac533313199f4f7be79490b7eee51;p=thirdparty%2FLuaJIT.git Merge branch 'master' into v2.1 --- 29b0b282f59ac533313199f4f7be79490b7eee51 diff --cc src/lj_snap.c index 93eb8a29,b387dd76..7d7347a1 --- a/src/lj_snap.c +++ b/src/lj_snap.c @@@ -557,13 -510,14 +557,15 @@@ void lj_snap_replay(jit_State *J, GCtra IRRef refp = snap_ref(sn); IRIns *ir = &T->ir[refp]; if (regsp_reg(ir->r) == RID_SUNK) { + uint8_t m; if (J->slot[snap_slot(sn)] != snap_slot(sn)) continue; pass23 = 1; - lua_assert(ir->o == IR_TNEW || ir->o == IR_TDUP || - ir->o == IR_CNEW || ir->o == IR_CNEWI); + lj_assertJ(ir->o == IR_TNEW || ir->o == IR_TDUP || + ir->o == IR_CNEW || ir->o == IR_CNEWI, + "sunk parent IR %04d has bad op %d", refp - REF_BIAS, ir->o); - if (ir->op1 >= T->nk) snap_pref(J, T, map, nent, seen, ir->op1); - if (ir->op2 >= T->nk) snap_pref(J, T, map, nent, seen, ir->op2); + m = lj_ir_mode[ir->o]; + if (irm_op1(m) == IRMref) snap_pref(J, T, map, nent, seen, ir->op1); + if (irm_op2(m) == IRMref) snap_pref(J, T, map, nent, seen, ir->op2); if (LJ_HASFFI && ir->o == IR_CNEWI) { if (LJ_32 && refp+1 < T->nins && (ir+1)->o == IR_HIOP) snap_pref(J, T, map, nent, seen, (ir+1)->op2);