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 D2B21532601; Wed, 16 Aug 2023 17:25:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D2B21532601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1692195912; bh=LtCbqXnheVw4x+BkQaZk9s69aDjsdebO3hxB6wf0PCU=; 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=lfG8XP6RDSAskd84SsxuCESdqEGPDWs6ehKs5up1BPQmVjIzFRWbxvN5JjGnYLZo0 GGLCvmIhsIKV8vwqlTgDacuCSj+PFJ70YxTNbFn0Hi0kzboQmb9Tu8lBPdgpUgR1aT wmjdxySLJziOnpmpDKBlPT+Ifo05/ysc/5JaxsSM= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 8C28B532601 for ; Wed, 16 Aug 2023 17:25:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8C28B532601 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1qWHSQ-00089B-IW; Wed, 16 Aug 2023 17:25:11 +0300 Date: Wed, 16 Aug 2023 17:20:23 +0300 To: Maxim Kokryashkin Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9700E0DCE2907754D4FC677755C812E332EA741D6A7864909182A05F538085040F2445C02A77E491A53B56401EDF034470032AF9B4B836DA46D0671B8F8B5B44F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7AC4684DF4EC4B256EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006374A24022C550661178638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D87359B24D9A57A750DDC11BEB9B45DDB7117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCCF01C05423B8DB1BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD1828451B159A507268D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8B3A703B70628EAD7BAAAE862A0553A39223F8577A6DFFEA7C741622C43FECC0DC43847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A529E6ACE6BCD529824EAEC7E2423CFAAB4208B660318F9F76F87CCE6106E1FC07E67D4AC08A07B9B01DAA61796BF5227BCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF94BD3B8E81C2D414D828063C0ED064DD5730D2C36B6DA23890D924C5DD01B9822DC0EA915DEF7D0C24F7434E9608BF9F7372039045189F85894FC7793F447565A74DFFEFA5DC0E7F02C26D483E81D6BE5EF9655DD6DEA7D65774BB76CC95456EEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojHVl7ekwB6hg4UkRZxtDllg== X-DA7885C5: D13E3BE0BA0D02EF7A565C129367CD4E22D5BF6D34BADF75EC3DC7445FA829BF262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73930F533AC2B33E986B69B28720D0C8C69E436569EDA6DD45360FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 14/19] Fix debug.getinfo() 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, Maxim! Thanks for the review! On 15.08.23, Maxim Kokryashkin wrote: > Hi, Sergey! > Thanks for the patch! > Please consider my comments below. > > On Wed, Aug 09, 2023 at 06:36:03PM +0300, Sergey Kaplun via Tarantool-patches wrote: > > From: Mike Pall > > > > Thanks to Sergey Ostanevich. > > > > (cherry-picked from commit 0cd643d7cfc21bc8b6153d42b86a71d557270988) > > > > This patch just reverts the commit > > 48f463e613db6264bfa9acb581fe1ca702ea38eb ("luajit: fox for > > debug.getinfo(1,'>S')") and applies the one from the main repo for the > Typo: s/for the/for/ Fixed. > > consistency with the upstream. > > --- > > src/lj_debug.c | 16 ++++++---------- > > 1 file changed, 6 insertions(+), 10 deletions(-) > > Since there were no test with the original fix, it would be nice to > add one. Added, see iterative diff below: =================================================================== diff --git a/test/tarantool-tests/lj-509-debug-getinfo-arguments-check.test.lua b/test/tarantool-tests/lj-509-debug-getinfo-arguments-check.test.lua new file mode 100644 index 00000000..a50b80e4 --- /dev/null +++ b/test/tarantool-tests/lj-509-debug-getinfo-arguments-check.test.lua @@ -0,0 +1,13 @@ +local tap = require('tap') + +-- Test file to demonstrate crash in the `debug.getinfo()` call. +-- See also: https://github.com/LuaJIT/LuaJIT/issues/509. +local test = tap.test('lj-509-debug-getinfo-arguments-check.test.lua') +test:plan(2) + +-- '>' expects to have an extra argument on the stack. +local res, err = pcall(debug.getinfo, 1, '>S') +test:ok(not res, 'check result of the call with invalid arguments') +test:like(err, 'bad argument', 'check the error message') + +test:done(true) =================================================================== > > > > 2.41.0 > Best regards, > Maxim Kokryashkin > > -- Best regards, Sergey Kaplun