From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 5E4D86EC60; Thu, 1 Apr 2021 13:07:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5E4D86EC60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617271626; bh=JnWp9fz7n1CqKtEmPyOw4i0SFqLunK4dqpNz5s3faq4=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ioaYe/sSP97SdFpki1bKsN3vXhWIoTedEo/DY7ptsWJhaI3qLm49WXJPUf/ba0rQM deeci6sgsMXgdYkl2c8AKHdZm5zyybF0BTThZbCgyI91/eRMeDer5uhO0x8TTF/E6j qnPX/yYsv4pXONYYlAiCRbmHjyNxCEYI0j/nWue0= Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id C1DCB6EC60 for ; Thu, 1 Apr 2021 13:07:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C1DCB6EC60 Received: by smtp63.i.mail.ru with esmtpa (envelope-from ) id 1lRuEB-0004QR-V9; Thu, 01 Apr 2021 13:07:04 +0300 Date: Thu, 1 Apr 2021 13:06:09 +0300 To: Igor Munkin Message-ID: References: <20210331225929.GZ29703@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210331225929.GZ29703@tarantool.org> X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E3294CA3588DDE0233B0D17711AF1EA2D7DB9182A05F538085040232EE433322484754A8A7ADA3D49CA90CB9503F5F21696CE6C72FFBBC0AE619D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE789066434B85BF7C7EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378D70459436292EC88638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CE99938B3FD79E1DFA99A1C1A2D43446687AB6B8485844540A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE74A95F4E53E8DCE969FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C34964A708C60C975A117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F79006376F83E65DF5A39473EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A51219BCAF7330E0ABEA8266DE34B29FFAAF6F551FDBA70AB4D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34103A2CD2CFC42C675E1DEE2F206FD9D9BFDBD5249C703CDDB39B4153E2C990D3BC331FE9045964FA1D7E09C32AA3244CF1682A3BEC1483BCB999B189EE1A82185595C85A795C7BAEFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojetunDCtJ20KjnzLS6cwMHQ== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB4ECDEB55A8A630AED752C3EC0E9649DDEB12A6304C4DE1796F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 09/30] test: disable Lua suite tests for line hook X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Igor, Thanks for the review! On 01.04.21, Igor Munkin wrote: > Sergey, > > Thanks for the patch! Please consider the comments below. > > On 26.03.21, Sergey Kaplun wrote: > > FIXME: LuaJIT interprets a return from a new function loaded by > > Typo: FIXME is excess here (looks like the comment copy-paste). Fixed. > > > `loadstring()` with a change line number for bytecode position > > unlike Lua does. This looks like "implementation-defined behaviour" > > Sorry, I can't understand what is written here, though I understand that > there is a difference between Lua and LuaJIT behaviour and the example > below. Could you please clarify the sentence above? =================================================================== test: disable Lua suite tests for line hook The LuaJIT's virtual machine interprets the bytecode following the return from function (i.e. the one succeeding the call made) and located on the line other than that return bytecode, as a new line trigger for line hooks, unlike Lua does. This looks like "implementation-defined behaviour" mentioned in https://luajit.org/status.html. All tests checking the debug hook for a new line of code are affected and disabled by this patch. Relates to tarantool/tarantool#5693 Part of tarantool/tarantool#5845 Part of tarantool/tarantool#4473 =================================================================== > > > mentioned in https://luajit.org/status.html. > > > > All tests checked the debug hook for a new line of code are affected > > Typo: s/tests checked/tests checking/. Fixed. > > > and disabled by this patch. > > > > Relates to tarantool/tarantool#5693 > > Part of tarantool/tarantool#5845 > > Part of tarantool/tarantool#4473 > > --- > > test/PUC-Lua-5.1-tests/db.lua | 19 ++++++++++++++++++- > > 1 file changed, 18 insertions(+), 1 deletion(-) > > > > diff --git a/test/PUC-Lua-5.1-tests/db.lua b/test/PUC-Lua-5.1-tests/db.lua > > index 9d2c86f..a8c7196 100644 > > --- a/test/PUC-Lua-5.1-tests/db.lua > > +++ b/test/PUC-Lua-5.1-tests/db.lua > > @@ -95,6 +95,23 @@ repeat > > assert(g(f) == 'a') > > until 1 > > > > +-- FIXME: LuaJIT interprets a return from calling result of > > +-- `loadstring()` with a new line number unlike Lua does. > > Meh, I also failed to understand the wording here... Reformulated as: =================================================================== -- FIXME: The LuaJIT's virtual machine interprets the bytecode -- following the return from function (i.e. the one succeeding -- the call made) and located on the line other than that return -- bytecode, as a new line trigger for line hooks, -- unlike Lua does. =================================================================== > > > +-- Here is an example (it is joined in one line intend): > > +--[[ > > +debug.sethook(function(_, l) print("LINE: "..l) end, "l") loadstring("\n\ns=nil")() debug.sethook() > > +--]] > > +-- This chunk prints for LuaJIT: > > +--[[ > > +LINE: 3 > > +LINE: 1 > > +--]] > > +-- But for Lua 5.1 it is only "LINE: 3" in the output. > > +-- See also https://github.com/tarantool/tarantool/issues/5693. > > +-- Considering implementation-defined behaviour diference > > Typo: s/diference/difference/. Fixed, thanks! > > > +-- (see also https://luajit.org/status.html) test is disabled for > > +-- LuaJIT. > > +--[=[ > > test([[if > > math.sin(1) > > then > > @@ -149,7 +166,7 @@ end > > ]], {1,2,1,2,1,3}) > > > > test([[for i=1,4 do a=1 end]], {1,1,1,1,1}) > > - > > +--]=] > > > > > > print'+' > > -- > > 2.31.0 > > > > -- > Best regards, > IM -- Best regards, Sergey Kaplun