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 A1BAE6F3C7; Fri, 26 Mar 2021 17:50:44 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A1BAE6F3C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616770244; bh=YbLtQAm/j/Adb7mglsoPIRH1apgFX45HxQJMs+sD+c4=; h=In-Reply-To:Date:References:To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=UUq07BHo4gz/9gkOSywj9F+5nZmgr/ZyQHhfQAorugGcVTc1nYCbE16kzj1eborjI VVVcbvYi36jnllRtfC/hCTh2woUiUKOf8U0spz3WMe9MJTdMLXh8yQVzjBbVrzNdLA EsYlll5ANkgvw9Sl4WvgxMzkEq/cAe1KKCEA8EaY= Received: from smtp31.i.mail.ru (smtp31.i.mail.ru [94.100.177.91]) (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 78C536F3C7 for ; Fri, 26 Mar 2021 17:50:43 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 78C536F3C7 Received: by smtp31.i.mail.ru with esmtpa (envelope-from ) id 1lPnnO-0000iC-Ox; Fri, 26 Mar 2021 17:50:43 +0300 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) In-Reply-To: <679ac3ff8cbcf449c2e47cc9d4446c3dcf0300d1.1616743343.git.skaplun@tarantool.org> Date: Fri, 26 Mar 2021 17:50:42 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <679ac3ff8cbcf449c2e47cc9d4446c3dcf0300d1.1616743343.git.skaplun@tarantool.org> To: Sergey Kaplun X-Mailer: Apple Mail (2.3654.60.0.2.21) X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E32947A0146560F8BA70927CAA5B950F38D9F182A05F538085040EDEEDF82077035D3F88C6E11AB13538086CCC2C263E2FBE43F7119B695BC166C X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7DB6A86BDF2D5A895EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F757A79C3007ACA28638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C5DD32608FC869F5D561B3BF0A500583E78FC546571F15AB5A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE77E7E81EEA8A9722B8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6E5E764EB5D94DBD4CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CFC5EA940A35A165FF2DBA43225CD8A89FB26E97DCB74E6252C6EABA9B74D0DA47B5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A5022C35A1F233C009461BA6C5B4E1A37FCAC590C4B0059823D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F1ADD4D8CD3C81CE397FE45DFEE30C8304FC72685E304E1182CAFD28D9E8FCF84B9420E3471784C51D7E09C32AA3244C711BEF19532966F5237E097701B8632FF26BFA4C8A6946B8FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojapPp7P/VpAh8yGZX02Qpog== X-Mailru-Sender: 3B9A0136629DC912F4AABCEFC589C81EFEB6D2867B9DC471872F523AE5600CC5DFAE731DFB4681A8AD07DD1419AC565FA614486B47F28B67C5E079CCF3B0523AED31B7EB2E253A9E112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 14/30] test: adapt activeline check in the PUC Lua test 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 Ostanevich via Tarantool-patches Reply-To: Sergey Ostanevich Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" LGTM. Sergos > On 26 Mar 2021, at 10:42, Sergey Kaplun wrote: >=20 > LuaJIT does not report line with single "end" statement > (the last line of the function) as an active line in > debug.getinfo(), unlike Lua does. There is no bytecode > related to this line, so it is "unreachable=E2=80=9D and > c be considered not active. >=20 > This patch excludes the last line of a function from the check, > considering LuaJIT's behaviour. >=20 > Closes tarantool/tarantool#5708 > Part of tarantool/tarantool#5845 > Part of tarantool/tarantool#4473 > --- > test/PUC-Lua-5.1-tests/db.lua | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) >=20 > diff --git a/test/PUC-Lua-5.1-tests/db.lua = b/test/PUC-Lua-5.1-tests/db.lua > index b363abc..c704877 100644 > --- a/test/PUC-Lua-5.1-tests/db.lua > +++ b/test/PUC-Lua-5.1-tests/db.lua > @@ -491,7 +491,15 @@ local _, l =3D coroutine.resume(co, 10) > local x =3D debug.getinfo(co, 1, "lfLS") > assert(x.currentline =3D=3D l.currentline and = x.activelines[x.currentline]) > assert(type(x.func) =3D=3D "function") > -for i=3Dx.linedefined + 1, x.lastlinedefined do > +-- LuaJIT does not report line with single "end" statement > +-- (the last line of the function) as an active line in > +-- debug.getinfo(), unlike Lua does. There is no bytecode > +-- related to this line, so it is "unreachable" and > +-- may be considered not active. > +-- See also https://github.com/tarantool/tarantool/issues/5708. > +-- LuaJIT: Test is adapted for LuaJIT's behaviour by avoiding > +-- the last line check. > +for i=3Dx.linedefined + 1, x.lastlinedefined - 1 do > assert(x.activelines[i]) > x.activelines[i] =3D nil > end > --=20 > 2.31.0 >=20