Skip to content

Commit

Permalink
chore(patches): fix ldoc intermittent fail caused by LuaJIT
Browse files Browse the repository at this point in the history
(cherry picked from commit c7c44a2)
  • Loading branch information
zhongweiy authored and bungle committed Dec 14, 2023
1 parent 29d1844 commit 84d3a40
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 65c849390702b1150d52e64db86cbc6b3c98413e Mon Sep 17 00:00:00 2001
From: Mike Pall <mike>
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/bundle/LuaJIT-2.1-20220411/src/lj_record.c b/bundle/LuaJIT-2.1-20220411/src/lj_record.c
index a49f942a..0122105b 100644
--- a/bundle/LuaJIT-2.1-20220411/src/lj_record.c
+++ b/bundle/LuaJIT-2.1-20220411/src/lj_record.c
@@ -970,6 +970,7 @@
emitir(IRTG(IR_RETF, IRT_PGC), trpt, trpc);
J->retdepth++;
J->needsnap = 1;
+ J->scev.idx = REF_NIL;
lj_assertJ(J->baseslot == 1+LJ_FR2, "bad baseslot for return");
/* Shift result slots up and clear the slots of the new frame below. */
memmove(J->base + cbase, J->base-1-LJ_FR2, sizeof(TRef)*nresults);
3 changes: 3 additions & 0 deletions changelog/unreleased/kong/fix-ldoc-intermittent-fail.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
message: fix ldoc intermittent failure caused by LuaJIT error.
type: bugfix
scope: Core

0 comments on commit 84d3a40

Please sign in to comment.