diff --git a/build/openresty/patches/LuaJIT-2.1-20230410_08_ldoc_error_fix.patch b/build/openresty/patches/LuaJIT-2.1-20230410_08_ldoc_error_fix.patch new file mode 100644 index 00000000000..b8d999c25b1 --- /dev/null +++ b/build/openresty/patches/LuaJIT-2.1-20230410_08_ldoc_error_fix.patch @@ -0,0 +1,22 @@ +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/bundle/LuaJIT-2.1-20230410/src/lj_record.c b/bundle/LuaJIT-2.1-20230410/src/lj_record.c +index a49f942a..0122105b 100644 +--- a/bundle/LuaJIT-2.1-20230410/src/lj_record.c ++++ b/bundle/LuaJIT-2.1-20230410/src/lj_record.c +@@ -975,6 +975,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); diff --git a/changelog/unreleased/kong/fix-ldoc-intermittent-fail.yml b/changelog/unreleased/kong/fix-ldoc-intermittent-fail.yml new file mode 100644 index 00000000000..125cad64cf9 --- /dev/null +++ b/changelog/unreleased/kong/fix-ldoc-intermittent-fail.yml @@ -0,0 +1,3 @@ +message: fix ldoc intermittent failure caused by LuaJIT error. +type: bugfix +scope: Core