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 6CC4336A609; Wed, 5 Apr 2023 08:37:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6CC4336A609 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1680673032; bh=g8AFAvbMj34O2r/KIZbYwdo3PNxNULCqllpQ6khs8iU=; 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=frUi2heQ6qtmIHSUW5bZF7qJXzyfX3By4sh7ZC1SbohTJbWMayrf2H8g2DORlXQbF rXRLikjf4HLv4ET23FfGTNuMrO8sfOVRUsC67L2+8+Q9IupX5LZX/q2kokN85xtuI6 B3c6AXHWy/kF5x5Ph/2pUAV+V295nrskHooTDQtU= 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 2B0A6369877 for ; Wed, 5 Apr 2023 08:37:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2B0A6369877 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1pjvpW-0001QU-5X; Wed, 05 Apr 2023 08:37:10 +0300 Date: Wed, 5 Apr 2023 08:33:20 +0300 To: Maksim Kokryashkin Message-ID: References: <20230328000317.33238-1-max.kokryashkin@gmail.com> <20230328000317.33238-5-max.kokryashkin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230328000317.33238-5-max.kokryashkin@gmail.com> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9755204094DAB9AF914EB78ED07480290C16612F4D18941751313CFAB8367EF908E2BE116634AD74DE809D58689777524C6AF4E86A32D6EE901DFC0CB58CA6A90888ABC412A473640 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7370F4F695FFFC24BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637DA5CEC9EE7F170198638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D86A526741BFF4013456120C919D533133117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC612DEA037BE4019FA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520599709FD55CB46A62CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B65D56369A3576CBA5089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A57EC5C9F1918CA036EFC64A317CE3A0180EF92CA1C65660E1F87CCE6106E1FC07E67D4AC08A07B9B0CE135D2742255B35CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF9D18588E685D217B34D699F0474A64AAB45332A70C1275ED01D163B59DD9DD334D6C1B221ADCA664D93D275CAE0A69C490D0AD616B9CA748FE2F3FF9D8A05139F4E8A8FB6BF8EBF5 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojJlgUV9tWvkTN9BjNnw6U8g== X-DA7885C5: 4677CEC7A5B87483517700C20D753BBBDFE842CA3B41E2C54E09D71152A3B43D262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73933AF1F914F131DBF5EE4D432151DF0A7BF1E0579DF96726440FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v3 4/4] Fix IR_RENAME snapshot number. Follow-up fix for a32aeadc. 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 adding test-case! LGTM, after fixing comments below. On 28.03.23, Maksim Kokryashkin wrote: > From: Mike Pall > > Reported by Victor Bombi, analyzed by XmiliaH. Thanks! > > (cherry-picked from commit bf51d3535109c4745bfbbe19a5587a9eac00259a) > > If the `snapalloc` flag is set, then the allocation hasn't > occurred yet, meaning that rename is applied to the next > snapshot. Otherwise, refs are already allocated and rename > is applied to the current snapshot. > > Maxim Kokryashkin: > * added the description and the test for the problem > > Part of tarantool/tarantool#7745 > Part of tarantool/tarantool#8069 > --- > src/lj_asm.c | 9 ++++++++- > .../gh-7745-ir-rename.test.lua | 20 +++++++++++++++++++ > 2 files changed, 28 insertions(+), 1 deletion(-) > create mode 100644 test/tarantool-tests/gh-7745-ir-rename.test.lua > > diff --git a/src/lj_asm.c b/src/lj_asm.c > index adfaf286..929a6da6 100644 > --- a/src/lj_asm.c > +++ b/src/lj_asm.c > diff --git a/test/tarantool-tests/gh-7745-ir-rename.test.lua b/test/tarantool-tests/gh-7745-ir-rename.test.lua > new file mode 100644 > index 00000000..d03f6da5 > --- /dev/null > +++ b/test/tarantool-tests/gh-7745-ir-rename.test.lua Please, rename to mention the original issue, from LuaJIT repo. Something like the following: > @@ -0,0 +1,20 @@ > +local tap = require('tap') > +local test = tap.test('IR_RENAME on snapshot allocation'):skipcond({ Minor: I suggest to name test the same as its filename (just to be consistent with other tests). > + ['Test requires JIT enabled'] = not jit.status(), > +}) > +test:plan(1) > + > +jit.opt.start('hotloop=1') > + > +local vals = {-0.1, 0.1, -0.1, 0.1} > +local i = 1 > +local _ > +while i < 5 do > + assert(i ~= 1.1) > + local l1 = vals[i] > + _ = l1 > 0 > + i = i + 1 Please, add comments near the lines emitted to interesting for us SNAP and RENAME. > +end > + > +test:ok(true, 'IR_RENAME is fine') > +os.exit(test:check()) Minor: The comment about missing `and 0 or 1` is desirable. > -- > 2.37.1 (Apple Git-137.1) > -- Best regards, Sergey Kaplun