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 0F0C1504BEF; Wed, 8 Nov 2023 11:42:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0F0C1504BEF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1699432945; bh=/0sDDFJkKtLUTNsHA7J6q+VVUrcTKkN+cQIeg0tNz5k=; 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=K1I0QwkWizU5ZK96Q+lL5IMAORcOJd0CwM2d/MrLxxSymfxX0KfDeoHDu+90gS+bO YR65qjqLS0TlosOZJlXAw2wjGoEF5xz4MV807FcEhcmMn+aksLu9CfXjae6xBUdndH /MtS5P0OVUYQM8PYXirbC1L2FVe+HAXgrsku8Q08= 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 A5E5A504BEF for ; Wed, 8 Nov 2023 11:42:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A5E5A504BEF Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1r0e8k-0007yU-TX; Wed, 08 Nov 2023 11:42:23 +0300 Date: Wed, 8 Nov 2023 11:37:50 +0300 To: Maksim Kokryashkin Message-ID: References: <20231107210616.53138-1-max.kokryashkin@gmail.com> <20231107210616.53138-3-max.kokryashkin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231107210616.53138-3-max.kokryashkin@gmail.com> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9CDA3EE4AC542069D395AC74FA62DEBE1A85E743BFEE5863A182A05F5380850404C228DA9ACA6FE27EFF9AD3764C6B0D3DC86453C23D69021B19AB333C7FBE1CD6EEFB65150F7F85C X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78E8764B5BC580342EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378B6D775AC58C227F8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D889301120C1D625A6DD9635F98842689A117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC60CDF180582EB8FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18E5D25F19253116ADD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269176DF2183F8FC7C0406C186E56A1B26068655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7C33389216BB544DE543847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A57C121D59698948026D59F3961BD86E45E8D1AFA4C7CECF36F87CCE6106E1FC07E67D4AC08A07B9B09E541A154B51D14BCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF0745DCE149E09BAFBB34604368F72EAA4D7BE578F4B8567C31CF24803F1DD7997622FCE73A124D832B33B16BC67043E098CA352A4A848BAB16BCFA98FB7A53D4A74DFFEFA5DC0E7F02C26D483E81D6BE5EF9655DD6DEA7D65774BB76CC95456EEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojGx6zOZpnTND9ZetBQsQL5w== X-DA7885C5: BBA235C37D0F9F9B6B1A20416BBB0893EF99565FBBA5F1109AEA69CB76355C63262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F7393590D8C940224AE33BEEE2F85F80D80FF6BA3A864DD8D065D0FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v2 2/2] Fix last commit. 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, Maksim! Thanks for the fixes! LGTM, after fixing the nit below. On 08.11.23, Maksim Kokryashkin wrote: > From: Mike Pall > > Reported by PluMGMK. > > (cherry-picked from commit 224129a8e64bfa219d35cd03055bf03952f167f6) > > The `_VMEVENTS` table, where the error handler for GC finalizers > is set, was not cleared from the stack after the initialization. > This commit adds stack cleanup. > > Maxim Kokryashkin: > * added the description and the test for the problem > > Part of tarantool/tarantool#9145 > --- > diff --git a/test/tarantool-c-tests/lj-991-fix-finalizer-error-handler-init.test.c b/test/tarantool-c-tests/lj-991-fix-finalizer-error-handler-init.test.c > new file mode 100644 > index 00000000..49befc29 > --- /dev/null > +++ b/test/tarantool-c-tests/lj-991-fix-finalizer-error-handler-init.test.c > @@ -0,0 +1,30 @@ > +#include "lua.h" > +#include "test.h" > +#include "utils.h" > + > +/* > + * This test demonstrates an uncleared Lua stack after the > + * initialization of the error handler for GC finalizers. > + * See https://github.com/luajit/luajit/issues/991 for > + * details. > + */ > + > +static int stack_is_clean(void *test_state) > +{ > + lua_State *L = test_state; > + assert_true(lua_gettop(L) == 0); Something strange with alignment here. > + return TEST_EXIT_SUCCESS; > +} > + > +int main(void) > +{ > + lua_State *L = utils_lua_init(); > + > + const struct test_unit tgroup[] = { > + test_unit_def(stack_is_clean) > + }; > + > + const int test_result = test_run_group(tgroup, L); > + utils_lua_close(L); > + return test_result; > +} > -- > 2.39.3 (Apple Git-145) > -- Best regards, Sergey Kaplun