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 BCA2D21C253; Thu, 16 Feb 2023 10:06:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BCA2D21C253 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1676531219; bh=QO94SanlocMTaCy9APEGp6p6yWcsIn3NsfIzoQR37XI=; 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=QhSAgpFOKCUlvdWZWe99rowYEDAEyS1+fAEPzTCRpl8kfHRgXXXWeBkL1AzBogGvM S7VqJBvvSIMzcS1T6xMKifoxC6Dr7KFl6Ve5BZrUjAkGw+2F0ubdv5nfbXCoyRybf+ MNta7C/ypZ2Di46/OLh4FGaL0jI5oN7EZt1izrfY= 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 441FB21C253 for ; Thu, 16 Feb 2023 10:06:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 441FB21C253 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1pSYM5-0003Rz-JI; Thu, 16 Feb 2023 10:06:58 +0300 Date: Thu, 16 Feb 2023 10:03:24 +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: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9806C989EC2150E3380C6DFC75C6EE8F43C1995440A46B57D182A05F5380850409D6C68C2E3D00B1135B9C76A472FF99E9E55EAC34DD41F412B4589A6C818C33D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7C2204D4F9A221771EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B84F9009663064BD8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8131CA734E4CCC5D7ADE6F5AA2675D6D4117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCDCBA8CBAA3833548A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520437C869540D2AB0F6FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6A45692FFBBD75A6A089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3433E9BC74ABA5769F2D2F717295A329EE5714914100E569CEC7387EC9B3167E1389694E2AD0D072B31D7E09C32AA3244C0A5A5EB455C9B9899BC34AEE52C38D7081560E2432555DBBFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojohRiI5imL49ZflKEGADDfw== X-DA7885C5: E56CFE3647A7E5E88BD8B85389D9391E2316C13104C53A07A97F06A0680E9AFD262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73933AF1F914F131DBF5D0BE25E5327860A097543E602E69CC810FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 5/5] 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 patch! Please consider my comments below. On 15.02.23, Maxim 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 current applied to current snapshot. Typo: s > > Maxim Kokryashkin: > * added the description for the problem > > Part of tarantool/tarantool#7745 I suggest to add the following: | Part of tarantool/tarantool#8069 > --- > src/lj_asm.c | 9 ++++++++- It will be nice to see the testcase, anyway. > 1 file changed, 8 insertions(+), 1 deletion(-) > > 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 > @@ -682,7 +682,14 @@ static void ra_rename(ASMState *as, Reg down, Reg up) > RA_DBGX((as, "rename $f $r $r", regcost_ref(as->cost[up]), down, up)); > emit_movrr(as, ir, down, up); /* Backwards codegen needs inverse move. */ > if (!ra_hasspill(IR(ref)->s)) { /* Add the rename to the IR. */ > - ra_addrename(as, down, ref, as->snapno); > + /* > + ** The rename is effective at the subsequent (already emitted) exit > + ** branch. This is for the current snapshot (as->snapno). Except if we > + ** haven't yet allocated any refs for the snapshot (as->snapalloc == 1), > + ** then it belongs to the next snapshot. > + ** See also the discussion at asm_snap_checkrename(). > + */ > + ra_addrename(as, down, ref, as->snapno + as->snapalloc); > } > } > > -- > 2.39.0 > -- Best regards, Sergey Kaplun