[tarantool-patches] [PATCH] luajit: fold machinery misbehaves

sergos at tarantool.org sergos at tarantool.org
Thu Jul 25 15:05:25 MSK 2019


 This is a temporary solution for
 https://github.com/LuaJIT/LuaJIT/issues/505

 Follow-up: #4376
---
 src/lj_opt_fold.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c
index acbf36a..e326aff 100644
--- a/src/lj_opt_fold.c
+++ b/src/lj_opt_fold.c
@@ -505,6 +505,11 @@ LJFOLDF(kfold_strref_snew)
 {
   PHIBARRIER(fleft);
   if (irref_isk(fins->op2) && fright->i == 0) {
+    /*
+    ** Temporary stub for LuaJIT bug #505 https://github.com/LuaJIT/LuaJIT/issues/505
+    ** Follow-up tracker is #4376
+    */
+    return NEXTFOLD;
     return fleft->op1;  /* strref(snew(ptr, len), 0) ==> ptr */
   } else {
     /* Reassociate: strref(snew(strref(str, a), len), b) ==> strref(str, a+b) */
-- 
2.17.1





More information about the Tarantool-patches mailing list