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 D81D96E1E5; Tue, 24 Nov 2026 11:03:16 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D81D96E1E5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1795507396; bh=zsq1GgRTnQb4/aJ6IzWq/T2nxcJAa6DIGRgYKUCgNfo=; 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=JL/ervSouVPxgTj5wHADyj6a9st9ug24ahIlBCiDscQLhx18UP+Q79HK+PGXeGtlu 9mcdoWkrCElY7+U7ZL0IYnu+/hviuZp867rwiZSmzy4JQqyV3Z4Yc8oYxZcLDSFjAb /7OKnp5sDns1hAFrx42FNK7DMEc61nyQwZgoqQvA= Received: from send196.i.mail.ru (send196.i.mail.ru [95.163.59.35]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id E917D6E1E5 for ; Tue, 24 Nov 2026 11:03:15 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E917D6E1E5 Received: by exim-smtp-56bb8ff957-62pm8 with esmtpa (envelope-from ) id 1xVlUg-00000000esk-2rdE; Tue, 24 Nov 2026 11:03:15 +0300 Date: Tue, 24 Nov 2026 11:05:32 +0300 To: Sergey Bronnikov Message-ID: References: <4a3e159dc353186f5ab439952190b83218e9cbf0.1795430601.git.skaplun@tarantool.org> <7c389fcd-976d-4471-9643-4d17d5a7ae8e@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c389fcd-976d-4471-9643-4d17d5a7ae8e@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9DFC18640EC9820972364247531C18ECD52C85AA1CACD82DD182A05F538085040F355E6234E086EF23DE06ABAFEAF67056EAFA479BC79859AB7A1F1CAA28ABB1243EB7D3813763A1D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE76042E2DB3E33BF2BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB5533756603DA5D6BE41EFC0D75813CD46F14E30D224829924B0E3AC69C892CDF9CCFC91C389733CBF5DBD5E9D5E8D9A59859A8B652D31B9D28593E51CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE77DCDFB3399A2F72843847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A56A900647A69116005002B1117B3ED696A40B7DF164599BA4E772F934B9BCD185823CB91A9FED034534781492E4B8EEADF5E532225D4D775BBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE191716CD42B3DD1D34CAB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D65978F5B3D42649A199009D3975904B51A63658A79F40DEE3C821BD63E14AE703E87A9EEF30593D19B2B8341EE9D5BE9A0A8F6BA9109AE22CC6BE9B427021EB5C4F09F24372FE85071F6536EB022892E5344C41F94D744909CECFA6C6B0C050A61A8CAF69B82BA93681CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXOcIETfglQORZ0zpDET4Zrk3igikrdHlWBV/7ZgM9U0im5/lFOSIJYM= X-Mailru-Sender: 689FA8AB762F73937C9FA53A4753B3133F3AF42C8761D9DD28CD34000127B208598B9789ABC14DC7E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 1/2] x86: Fix math.floor()/ceil() argument check. 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" Hi, Sergey! Thanks for the review! See my answers below. Branch is force-pushed. On 23.11.26, Sergey Bronnikov wrote: > Hi, Sergey! > > thanks for the patch! LGTM with minor comments. > > Sergey > > On 11/23/26 13:46, Sergey Kaplun wrote: > > diff --git a/test/tarantool-tests/lj-1532-math-floor-ceil-argcheck.test.lua b/test/tarantool-tests/lj-1532-math-floor-ceil-argcheck.test.lua > > new file mode 100644 > > index 00000000..b9def637 > > --- /dev/null > > +++ b/test/tarantool-tests/lj-1532-math-floor-ceil-argcheck.test.lua > > @@ -0,0 +1,36 @@ > > +local tap = require('tap') > > + > > +-- Test file to demonstrate LuaJIT incorrect handling of no > > +-- arguments for `math.ceil()`, `math.floor()` functions. > > +-- See also:https://github.com/LuaJIT/LuaJIT/issues/1532. > > + > > +local test = tap.test('lj-1532-math-floor-ceil-argcheck') > > + > > +test:plan(2) > > + > > +-- A simple function to push a number value for `math.floor()`, > > +-- `math.ceil()` to the Lua stack. > > In fact, a function can push a value for any function, not only > `math.floor()` or `math.ceil()`. > > I would omit the comment at all. I've just exmplained here that function must to push some value to the stack to be used later as the dirty value for the aforementioned functions. The comment about functions explains the returned value. > > > +local function stack() > > + return 1.2 > > +end > > + > > +local function call_wp(f) > > + stack() -- Push some value to the stack to mark the slot. > nit: we usually put a comments before the line, isn't it? Moved: =================================================================== diff --git a/test/tarantool-tests/lj-1532-math-floor-ceil-argcheck.test.lua b/test/tarantool-tests/lj-1532-math-floor-ceil-argcheck.test.lua index b9def637..a2a2fb80 100644 --- a/test/tarantool-tests/lj-1532-math-floor-ceil-argcheck.test.lua +++ b/test/tarantool-tests/lj-1532-math-floor-ceil-argcheck.test.lua @@ -15,7 +15,8 @@ local function stack() end local function call_wp(f) - stack() -- Push some value to the stack to mark the slot. + -- Push some value to the stack to mark the slot. + stack() -- Use non-inlined variant for function name in the error -- message. local res = f() =================================================================== > > + -- Use non-inlined variant for function name in the error > > + -- message. > > + local res = f() > > + return res > > +end > > + > > +local function math_func_test(subtest, f) > > + subtest:plan(2) > > + local err, msg = pcall(call_wp, f) > > + subtest:is(err, false, 'correct status for empty ' .. subtest.name) > > + subtest:like(msg, "bad argument #1 to 'f' %(number expected, got no value%)", > > + 'correct error message for empty ' .. subtest.name) > > +end > > + > > +test:test('math.ceil', math_func_test, math.ceil) > > +test:test('math.floor', math_func_test, math.floor) > > + > > +test:done(true) -- Best regards, Sergey Kaplun