From: Mike Pall Date: Thu, 28 Nov 2024 15:26:10 +0000 (+0100) Subject: Fix detection of inconsistent renames due to sunk values. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=811e448daa0f8f06e946fb607a98ace85c43b574;p=thirdparty%2FLuaJIT.git Fix detection of inconsistent renames due to sunk values. Thanks to Sergey Kaplun. #1295 #584 --- diff --git a/src/lj_asm.c b/src/lj_asm.c index 7c4d8f52..c217609b 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c @@ -826,11 +826,11 @@ static int asm_sunk_store(ASMState *as, IRIns *ira, IRIns *irs) static void asm_snap_alloc1(ASMState *as, IRRef ref) { IRIns *ir = IR(ref); - if (!irref_isk(ref) && ir->r != RID_SUNK) { + if (!irref_isk(ref)) { bloomset(as->snapfilt1, ref); bloomset(as->snapfilt2, hashrot(ref, ref + HASH_BIAS)); if (ra_used(ir)) return; - if (ir->r == RID_SINK) { + if (ir->r == RID_SINK || ir->r == RID_SUNK) { ir->r = RID_SUNK; #if LJ_HASFFI if (ir->o == IR_CNEWI) { /* Allocate CNEWI value. */