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 201A958E232; Mon, 21 Aug 2023 12:02:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 201A958E232 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1692608579; bh=Ju63199orf5Hphi3ZI2P5t4PKKKqfik69zY+9PkFjuI=; 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=M0OyISnaqGbTxEAqX51nxCn2SJfZgoPVWhXgwhleWETfPQA2R/8QxmIjyx1DqSyoX xWoPL1SmHBjEE7zwle+DOCceTRK+KXSGGaDR6bdlWT63nYMbQpbu+pwvrGtkmae48g IU2Bb+c/VzTxdVXOW/esvQ8/tW6j2r9vFemIHIVw= Received: from smtp30.i.mail.ru (smtp30.i.mail.ru [95.163.41.71]) (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 44C16572182 for ; Mon, 21 Aug 2023 12:02:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 44C16572182 Received: by smtp30.i.mail.ru with esmtpa (envelope-from ) id 1qY0oJ-0005Xf-1D; Mon, 21 Aug 2023 12:02:55 +0300 Date: Mon, 21 Aug 2023 11:58:10 +0300 To: Maxim Kokryashkin Message-ID: References: <20230817144641.20088-1-skaplun@tarantool.org> 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: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD93C8852532D76B9E3155AD137556C14E709A4466288DB511C182A05F5380850401E800DEFABD2EAAD335DAE2D5F856F8157136708052878E72864648705A39F36 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70312E9A300D47E3BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637CF20B9B7F5DD35A68638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8067E6AE043417A9B8E86A1970AFEBF0E117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCC5BB9672376CF5DAA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD182CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE0AC5B80A05675ACD1DBC1C451FC279AAD8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE3F8BD4E506CFA3D88302FCEF25BFAB345C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407978DA827A17800CE79F72382A8EA570EC2DBA43225CD8A89FB26E97DCB74E6252CE5475246E174218B5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A51272ED4BD6EBFC2BDD7FDA708945ED5F3FE6D546EE1A1C12F87CCE6106E1FC07E67D4AC08A07B9B013BDA61BF53F5E1DCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D3430FC2BC1B917F018037D338678587CE24558ACAB819B7BE7EA81FE08B938DA29506DE1F97B0FCC341D7E09C32AA3244CD157AA998CEF7B46AC6273A1DBDB0EFD725D5B54B2FE457585A42E4C463514DC5DA084F8E80FEBD3202CD0F03380D9577A83BD0C44CE203720ABEDE4BBDD9CDD X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojHJI2DMjVra21HskLVmjaZQ== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A769E1195612ACEED968335DAE2D5F856F81DDEE725E12766E67DEDBA653FF35249392D99EB8CC7091A70E183A470755BFD208F19895AA18418972D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] Fix TDUP load forwarding after table rehash. 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 your review! I fixed your comments and force-pushed the branch. On 20.08.23, Maxim Kokryashkin wrote: > Hi, Sergey! > Thanks for the patch! > LGTM, except for a few comments below. > On Thu, Aug 17, 2023 at 05:46:41PM +0300, Sergey Kaplun wrote: > > From: Mike Pall > > > > Reported by Sergey Kaplun. > > > > (cherry-picked from commit c7db8255e1eb59f933fac7bc9322f0e4f8ddc6e6) > > > > After table rehashing number keys loaded via ALOAD may be placed in the > > hash part of the table. So, load forwarding analysis missed the > > corresponding stores like they are never existed. In such case, either > Typo: s/they are/they/ > Typo: s/In such/In that/ Fixed. > > we faced an assertion failure in `fwd_ahload()` due to values types > Typo: s/values/value/ Fixed. > > mismatch, either we faced an assertion failure in `rec_check_slots()` > Typo: s/either/or/ Fixed. > > since forwarded value by the JIT compiler isn't the same as it is in the > Typo: s/since/since the/ Fixed. > > interpreter. > > > > This patch adds a check that there is no any `IR_NEWREF` after table > Typo: s/no any/no/ Fixes. > > creation, so it can't be rehashed. > > > > Sergey Kaplun: > > * added the description and the test for the problem > > > > Part of tarantool/tarantool#8825 > > --- > > > > Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-980-load-fwd-after-table-rehash > > PR: https://github.com/tarantool/tarantool/pull/8998 > > Related issues: > > * https://github.com/LuaJIT/LuaJIT/issues/980 > > * https://github.com/tarantool/tarantool/issues/8825 > > > > +-- The test for TNEW load forwarding. It doesn't trigger an assert > > +-- since the commit "Fix TNEW load forwarding with instable > > +-- types.". But still add it to avoid regressions in future. > Typo: s/But still add it/But is still added/ > Typo: s/in future/in the future/ Fixed. > > +for i = 6, 9 do > > + > > +-- TNEW load forwarding, aliased table. > The same label about this test being added only for the sake of > regressional testing should be added here too. Fixed, see iterative patch below. Branch is force-pushed. =================================================================== diff --git a/test/tarantool-tests/lj-980-load-fwd-after-table-rehash.test.lua b/test/tarantool-tests/lj-980-load-fwd-after-table-rehash.test.lua index a27932df..643b7823 100644 --- a/test/tarantool-tests/lj-980-load-fwd-after-table-rehash.test.lua +++ b/test/tarantool-tests/lj-980-load-fwd-after-table-rehash.test.lua @@ -15,7 +15,8 @@ jit.opt.start('hotloop=1') local result -- The test for TNEW load forwarding. It doesn't trigger an assert -- since the commit "Fix TNEW load forwarding with instable --- types.". But still add it to avoid regressions in future. +-- types.". But is still added it to avoid regressions in the +-- future. for i = 6, 9 do -- Need big enough table to see rehashing. -- Also, to simplify logic with AREF, HREF don't use default @@ -36,7 +37,10 @@ end test:is(result, 9, 'TNEW load forwarding') --- TNEW load forwarding, aliased table. +-- TNEW load forwarding, aliased table. It doesn't trigger an +-- assert since the commit "Fix TNEW load forwarding with instable +-- types.". But is still added it to avoid regressions in the +-- future. local alias_store = {{}, {}, {}, {}, {}} for i = 6, 9 do local t = {i, i, i, i, i, i, i} =================================================================== > > +local alias_store = {{}, {}, {}, {}, {}} > > 2.41.0 > > -- Best regards, Sergey Kaplun