Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release/3.3.x] chore(patches): fix ldoc intermittent fail caused by LuaJIT #12145

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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