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 A6F336BD2D; Tue, 13 Apr 2021 16:33:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A6F336BD2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618320783; bh=gLkoBmVScthr5lgXHkm484GquF5KAED17SuV2eRcMxE=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Zk9SC3MZCC387pKHZUIb7wvebUJE5KbFIFqCUFqNyyV7Re5C9a+1p1Guxy7aRKDXL Juu7uaKVBdUPDEIikNpHwa70uq2CqgOHoBWGvHifVQeN4kPVlbTzQBengK/36pBS/p 5BY8qGaid0svFi1A8H90fri4hrIWR1syyUMC+Vgo= Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [94.100.177.108]) (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 0998E6B955 for ; Tue, 13 Apr 2021 16:28:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0998E6B955 Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1lWJ5p-0000dj-7T; Tue, 13 Apr 2021 16:28:37 +0300 To: Sergey Ostanevich , Igor Munkin Date: Tue, 13 Apr 2021 16:27:09 +0300 Message-Id: <58322d1fc598b704438c098fd8d97a20bcb038a8.1618320000.git.skaplun@tarantool.org> X-Mailer: git-send-email 2.31.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E748094FADAEB10E66ADA4C48BE3C291E66DA182A05F53808504023F5B8782ADD75A81389B1574E9B0E2371E84C93AA9AE022E54ABEA25CB5EC2F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7548C33FFD72831AFEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006375E347E1311495C1B8638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2C65B1B163C2732A7D1D26EB41B88FBE10FE69BD46C3DD557D2E47CDBA5A96583C09775C1D3CA48CF776A0366D588B3C3117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE74601F13E4625331C9FA2833FD35BB23DF004C906525384302BEBFE083D3B9BA73A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4933F735096452955E3A3CCBC2573AEBDE1C4224003CC83647689D4C264860C145E X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CB69F9342289A40B3059849B5A2F8CC286206ED1E80137AB69C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EF0417BEADF48D1460699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D346AD04FDA812EEFF1E366B443DCF3621993F6E933B32529C5E8285FECCE44F332C2807027C1F175F81D7E09C32AA3244C637A51523FB346582CFEC770B2013F86F165894D92D62706927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojnA7/qPBUIXGpPwMnzJKKZg== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB478FFE019D3D1588E0CB0C4669B49AB2C734E0507E5A754C9F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit v3 09/29] test: disable PUC-Rio 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" 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 --- test/PUC-Rio-Lua-5.1-tests/db.lua | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/test/PUC-Rio-Lua-5.1-tests/db.lua b/test/PUC-Rio-Lua-5.1-tests/db.lua index 9d2c86f0..c9741981 100644 --- a/test/PUC-Rio-Lua-5.1-tests/db.lua +++ b/test/PUC-Rio-Lua-5.1-tests/db.lua @@ -95,6 +95,26 @@ repeat assert(g(f) == 'a') until 1 +-- 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 difference +-- (see also https://luajit.org/status.html) test is disabled for +-- LuaJIT. +--[=[ test([[if math.sin(1) then @@ -149,7 +169,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