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 04C3065129B; Sat, 16 Sep 2023 20:31:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 04C3065129B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1694885517; bh=6ORGwwFDcUniOH2aYeVjeD/zr0JkGqjES2DKHnoUCYw=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=OlNHPiPUDDOts3i93kiRVxrR7gT5cGv1CXT6nEuYv23ovrzOpTYhMRrC6QQD6zMUR CrYc0pTZ5q8IR+scjzvg+tg/jGR2uJOLbbvIwUA0YY0+tjL4oENGnkPzJgt4BVan5C pvxX5pLcjWLyN+Jk+z9hFpxkWf9om+L8K78VsbFE= Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [95.163.41.68]) (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 1849263F138 for ; Sat, 16 Sep 2023 20:31:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1849263F138 Received: by smtp29.i.mail.ru with esmtpa (envelope-from ) id 1qhZ98-001Lsp-0o; Sat, 16 Sep 2023 20:31:54 +0300 Message-ID: <9e40b101-6a55-4961-0eda-7c8a955deb13@tarantool.org> Date: Sat, 16 Sep 2023 20:31:53 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 To: Sergey Kaplun , Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org References: <20230829123641.3303-1-skaplun@tarantool.org> Content-Language: en-US In-Reply-To: <20230829123641.3303-1-skaplun@tarantool.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9FD052C19707CBA10A107557D5B07C3B24168398A62115A0400894C459B0CD1B90F0D3409293B26ECC1EBF29E129545D2AA3399700325E5FB15CD2B5BB6EB5A8F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE71B5FCE2AF2D0EAB4EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637175EF79FCE26347D8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D84DABA9E4ED3754A4C7EF6CBE3511F1E0117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAE9A1BBD95851C5BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD1828451B159A507268D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEB28585415E75ADA9C8623B8F170C382FD8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE389DDFE3E282F3DD16136E347CC761E07C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637B5EAED125435346EEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A59FC9E33B7C9F617F51F28D11105F44D7CAE5EE17E875C088F87CCE6106E1FC07E67D4AC08A07B9B01DAA61796BF5227BCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF0717C6394D3DBBC50CC30955BE819A0BC44BD606FB311BDE39E3059435BA5EC9124E09ADABDE4174B3573C328C294A3D9657807E5FD4560182416A23F08E6E18E48CAC7CA610320002C26D483E81D6BE0DBAE6F56676BC7117BB6831D7356A2DEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojwfkaTmrWlaycZ3rrcMStRw== X-Mailru-Sender: C4F68CFF4024C8867DFDF7C7F2588458189EF58CA657045C85680FA8F5167B4EEF5638EADA4E8A50282EC151BADDC1D3523A6D01B4765B2DFB59E2DDD9FE06B14FA522850F29BC30B0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] Handle table unsinking in the presence of IRFL_TAB_NOMM. 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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey Thanks for the patch! LGTM See a minor comment below. On 8/29/23 15:36, Sergey Kaplun wrote: > diff --git a/test/tarantool-tests/lj-1052-unsink-with-irfl-tab-nomm.test.lua b/test/tarantool-tests/lj-1052-unsink-with-irfl-tab-nomm.test.lua > new file mode 100644 > index 00000000..aaf5349f > --- /dev/null > +++ b/test/tarantool-tests/lj-1052-unsink-with-irfl-tab-nomm.test.lua > @@ -0,0 +1,36 @@ > +local tap = require('tap') > + > +-- Test file to demonstrate LuaJIT's incorrect restoration of a > +-- table from a snapshot with the presence of `IRFL_TAB_NOMM`. > +-- See also: https://github.com/LuaJIT/LuaJIT/issues/1052. > + > +local test = tap.test('lj-1052-unsink-with-irfl-tab-nomm'):skipcond({ > + ['Test requires JIT enabled'] = not jit.status(), > +}) > + > +test:plan(2) > + > +local TEST_VALUE = 'test' > + > +jit.opt.start('hotloop=1') > + > +local counter = 0 > +local slot = 'slot' > +while true do You are using endless loop here, but loop is limited by 3 iterations (break after counter > 2). Why "while true do end" is used here? Should we left a comment here? > + counter = counter + 1 > + -- Use a non-constant slot to emit `FREF` with `IRFL_TAB_NOMM`. > + -- After re-emitting the variant part of the loop, NEWREF will > + -- contain a constant key (see below). > + slot = {[slot] = TEST_VALUE} > + -- Emit exit here to be sure that the table will be restored > + -- from the snapshot. > + if counter > 2 then break end > + -- We need a constant reference for NEWREF. Just use the old > + -- value. > + slot = 'slot' > +end