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 66984581FDB; Thu, 17 Aug 2023 11:29:56 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 66984581FDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1692260996; bh=REaYOJhjs+qsEsHQ1GrKkHBKUtn5R6b5/GqvUJNg2O8=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=h1cHbL0ahcmmVOPrbQcxfzWmZHIpqumw2p7IsekiOqMVpIQx8npO4rqG/59ZPWZvZ 6zSYBCEIz0BzSrlkLr2jimzfnRvv3yeG9w42FKW5LmhdZ22cc+1vMb+y6CuiL2b1QV PnScwQ8H1mh8AcZ2jkLo3BCqm8Rne1JMRbrD1nW0= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 0BD0D581FDB for ; Thu, 17 Aug 2023 11:29:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0BD0D581FDB Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1qWYOA-0000Zt-8i; Thu, 17 Aug 2023 11:29:54 +0300 Message-ID: Date: Thu, 17 Aug 2023 11:29:53 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: Sergey Kaplun , Igor Munkin Cc: tarantool-patches@dev.tarantool.org References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9700E0DCE2907754D065B653CA1E56B5DB3B38B4431605699182A05F538085040713941ED507093506819BDAF15B206C3AB5C9C6E92FBF0E770D1D0419A636393 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE77E216A0E97507353EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637670E1B164B70895C8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D82BFE76644D3132C4567BA9B11CB9271E117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC911D863C7A028B9E389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8A9FF340AA05FB58CF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE33AC447995A7AD182BEBFE083D3B9BA73A03B725D353964B21E93C0F2A571C7B35872C767BF85DA227C277FBC8AE2E8B80B9CEB5436E71E375ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A57414729487D64DA05240892097A93881D139F4DF1888F80DF87CCE6106E1FC07E67D4AC08A07B9B064E7220B7C550592CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF2CF74D039C0061BB846DCF9082C37B8A046D0AC2C20E7A01B945C115C1FC606D80BEFAEC9D27200824F7434E9608BF9F2673973DC40D416FF609D24894DE57ABE48CAC7CA610320002C26D483E81D6BE0DBAE6F56676BC7117BB6831D7356A2DEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojFRrmMqSMPxoxrkkfpDU+Zg== X-DA7885C5: EB7507B219FA4CF9324F417FB0025C77D65F2B4E0895FA185D8682FDDB39F452262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73930F533AC2B33E986BBA82E7B90B230624C7275CF254D1151EDD788429FD8613638ED9BB8B05EE7B3AFB559BB5D741EB96D19CD4E7312BAA970A04DAD6CC59E3365FEEDEB644C299C0ED14614B50AE0675 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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! LGTM On 8/9/23 18:36, Sergey Kaplun 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 > consistency with the upstream. > --- > src/lj_debug.c | 16 ++++++---------- > 1 file changed, 6 insertions(+), 10 deletions(-) > > diff --git a/src/lj_debug.c b/src/lj_debug.c > index 654dc913..c4edcabb 100644 > --- a/src/lj_debug.c > +++ b/src/lj_debug.c > @@ -431,16 +431,12 @@ int lj_debug_getinfo(lua_State *L, const char *what, lj_Debug *ar, int ext) > TValue *frame = NULL; > TValue *nextframe = NULL; > GCfunc *fn; > - if (*what == '>') { /* we have to have an extra arg on stack */ > - if (lua_gettop(L) > 2) { > - TValue *func = L->top - 1; > - api_check(L, tvisfunc(func)); > - fn = funcV(func); > - L->top--; > - what++; > - } else { /* need better error to display? */ > - return 0; > - } > + if (*what == '>') { > + TValue *func = L->top - 1; > + if (!tvisfunc(func)) return 0; > + fn = funcV(func); > + L->top--; > + what++; > } else { > uint32_t offset = (uint32_t)ar->i_ci & 0xffff; > uint32_t size = (uint32_t)ar->i_ci >> 16;