Skip to content

Commit

Permalink
Fix detection of inconsistent renames due to sunk values.
Browse files Browse the repository at this point in the history
Thanks to Sergey Kaplun. LuaJIT#1295 LuaJIT#584
  • Loading branch information
Mike Pall committed Nov 28, 2024
1 parent 5141cbc commit 811e448
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lj_asm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 811e448

Please sign in to comment.