From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 4569A22A6B for ; Thu, 25 Jul 2019 08:05:27 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HgKp2u9d1m-w for ; Thu, 25 Jul 2019 08:05:27 -0400 (EDT) Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 08A7C22A4B for ; Thu, 25 Jul 2019 08:05:26 -0400 (EDT) Received: from [185.6.245.156] (port=49777 helo=linuxkit-025000000001.mail.msk) by smtp29.i.mail.ru with esmtpa (envelope-from ) id 1hqcUv-0000Cp-68 for tarantool-patches@freelists.org; Thu, 25 Jul 2019 15:05:25 +0300 From: sergos@tarantool.org Subject: [tarantool-patches] [PATCH] luajit: fold machinery misbehaves Date: Thu, 25 Jul 2019 12:05:25 +0000 Message-Id: <20190725120525.897-1-sergos@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org 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