From 65c849390702b1150d52e64db86cbc6b3c98413e Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Thu, 9 Nov 2023 11:02:36 +0100 Subject: [PATCH] Invalidate SCEV entry when returning to lower frame. Thanks to Zhongwei Yao. #1115 --- src/lj_record.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lj_record.c b/src/lj_record.c index a49f942a..0122105b 100644 --- a/src/lj_record.c +++ b/src/lj_record.c @@ -755,6 +755,7 @@ void lj_record_ret(jit_State *J, BCReg rbase, ptrdiff_t gotresults) emitir(IRTG(IR_RETF, IRT_P32), trpt, trpc); J->retdepth++; J->needsnap = 1; + J->scev.idx = REF_NIL; lua_assert(J->baseslot == 1); /* Shift result slots up and clear the slots of the new frame below. */ memmove(J->base + cbase, J->base-1, sizeof(TRef)*nresults);