-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(luajit2): iterate over non-empty table got empty on OpenResty 1.2…
…1.4.1
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
openresty-patches/patches/1.21.4.1/LuaJIT-2.1-20220411_02.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
From dad04f1754723e76ba9dcf9f401f3134a0cd3972 Mon Sep 17 00:00:00 2001 | ||
From: Mike Pall <mike> | ||
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: |