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 BD09E58A225; Tue, 15 Aug 2023 16:35:24 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BD09E58A225 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1692106524; bh=vwyk5fp+sYMZ/ADbh6wkwxy6DBvxBjD9EVjsI5qDnYA=; 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=Ryqsb5fKdV6TT3O5yI/2kEGwlVel0L8iRPoGJRPQ/L/CE+xNW9EqfM8NS9adPwdBc p8oIs3djOTi7wHuMhExEhFr9dwtvPNftgvsC8Hem5MNRB0zNL0CO/e3ZZ8svlwCKpP diP/+ZDOWKUzUWIIkeQVchmweZUHI1OfDJMhTKEE= Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [95.163.41.80]) (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 A9ACF589F42 for ; Tue, 15 Aug 2023 16:35:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A9ACF589F42 Received: by smtp39.i.mail.ru with esmtpa (envelope-from ) id 1qVuCg-009Mxg-2V; Tue, 15 Aug 2023 16:35:23 +0300 Date: Tue, 15 Aug 2023 16:35:22 +0300 To: Sergey Kaplun 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-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD969E04B5EED670DC86EE92E42F0C271DDDF6A6B73F41FC074182A05F538085040D936399445A97C0AAC76F0C9A1D148C6A03D6F08BB69B8813F5824285081E67D X-C1DE0DAB: 0D63561A33F958A5FA0ACAE10B47411E48CE0B5D00CA68FB5AD0401A58EBFCA5F87CCE6106E1FC07E67D4AC08A07B9B06A1CB4668A9CA5FACB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0AD5177F0B940C8B66ECE892A7B2722663E91682638B966EB3F662256BEEFA9527FD2792587D9C9B0869160AB0369CF556AA9D3A1DF25C5058E56EBFE2A10A92FAAA2C7EB5BEC52EE0137FD76D11AF80A0DF680D7B4BD455C31B4F282B1744B2397EA455F16B58544A21C197AAF4D2E4732965026E5D17F6739C77C69D99B9914278E50E1F0597A6FD5CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojHVl7ekwB6hj705bjpbAqBg== X-Mailru-Sender: 11C2EC085EDE56FA38FD4C59F7EFE4072F4DBFEA841B53CA59C17D753B1A251D0FF2D94DDA5A807DD51284F0FE6F529ABC7555A253F5B200DF104D74F62EE79D27EC13EC74F6107F4198E0F3ECE9B5443453F38A29522196 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: Maxim Kokryashkin via Tarantool-patches Reply-To: Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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/ > 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. > > 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; > -- > 2.41.0 Best regards, Maxim Kokryashkin >