diff --git a/openresty-patches/patches/1.21.4.1/LuaJIT-2.1-20210510_01_patch_macro_luajit_version.patch b/openresty-patches/patches/1.21.4.1/LuaJIT-2.1-20220411_01_patch_macro_luajit_version.patch similarity index 100% rename from openresty-patches/patches/1.21.4.1/LuaJIT-2.1-20210510_01_patch_macro_luajit_version.patch rename to openresty-patches/patches/1.21.4.1/LuaJIT-2.1-20220411_01_patch_macro_luajit_version.patch diff --git a/openresty-patches/patches/1.21.4.1/LuaJIT-2.1-20220411_02.patch b/openresty-patches/patches/1.21.4.1/LuaJIT-2.1-20220411_02.patch new file mode 100644 index 00000000..75644739 --- /dev/null +++ b/openresty-patches/patches/1.21.4.1/LuaJIT-2.1-20220411_02.patch @@ -0,0 +1,24 @@ +From dad04f1754723e76ba9dcf9f401f3134a0cd3972 Mon Sep 17 00:00:00 2001 +From: Mike Pall +Date: Wed, 14 Sep 2022 12:26:53 +0200 +Subject: [PATCH] Fix trace join to BC_JLOOP originating from BC_ITERN. + +Reported by OpenResty Inc. +--- + src/lj_record.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/LuaJIT-2.1-20220411/src/lj_record.c b/LuaJIT-2.1-20220411/src/lj_record.c +index 5d02d24a1..bfd412365 100644 +--- a/LuaJIT-2.1-20220411/src/lj_record.c ++++ b/LuaJIT-2.1-20220411/src/lj_record.c +@@ -2572,7 +2572,8 @@ void lj_record_ins(jit_State *J) + break; + case BC_JLOOP: + rec_loop_jit(J, rc, rec_loop(J, ra, +- !bc_isret(bc_op(traceref(J, rc)->startins)))); ++ !bc_isret(bc_op(traceref(J, rc)->startins)) && ++ bc_op(traceref(J, rc)->startins) != BC_ITERN)); + break; + + case BC_IFORL: \ No newline at end of file