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 566795FD8DF; Wed, 27 Sep 2023 15:56:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 566795FD8DF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1695819387; bh=MisWZ5S0TrUB0lOdnvaxL86Fvcs0j0iNR/Xo38Hkoys=; 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=rvBtHzL11IEpQ/kmEkwsoTiURQQ1aoJm89DQn0OVwiiPMCP8fvGfBvEAzby1Uq5zT oDvNJRgkyqmL23Hr+bOiDPrCnF7L4i6X60GsM3ZQEYBU1DPVYS0GzCnfQ9FKHoyDyJ 2WwxxwNh+rkdB/2a3oOBxJyKDRXQp2nsu9bxEVxA= Received: from smtp53.i.mail.ru (smtp53.i.mail.ru [95.163.41.90]) (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 170DD5FD8E2 for ; Wed, 27 Sep 2023 15:55:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 170DD5FD8E2 Received: by smtp53.i.mail.ru with esmtpa (envelope-from ) id 1qlU4O-001X3p-1j; Wed, 27 Sep 2023 15:55:12 +0300 Date: Wed, 27 Sep 2023 12:33:50 +0000 To: Sergey Kaplun Message-ID: References: <20230829123641.3303-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230829123641.3303-1-skaplun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD99F1801485BB04E1423D61104C1CC0B2136583860746CA8231313CFAB8367EF908E2BE116634AD74D8EB004C0BE9A39C38F58A06B9071CE003B7BF9DC7E6B0FC5B6A098A45AF874EE X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78AC0750F3304E924EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006375E280A1EC162AD7D8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D897E497BA52916B3B6023A109FFC44280117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC47272755C61AA17BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FC26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE0AC5B80A05675ACD4D0DA9BD313A0613D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE3F8BD4E506CFA3D882D242C3BD2E3F4C6C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637149D0840703ADBE5EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A51FA03D751B09D5EA30EB0A1677A4B5A3E009ED81786A57A7F87CCE6106E1FC07E67D4AC08A07B9B0706E30CA52318619CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFC8AF147DCD08258D95559932B3385C747B2D26BBCF73C50A5A363B8B549D17D160B027A3EDF90BC1498C68607A7C88719BC8889738AD594918A5B31429E635FAA74DFFEFA5DC0E7F02C26D483E81D6BEECAEF3E2CCC1ED8C383653B6C8D9AE0FD16FCAA6493B703A X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojTKVCr97n33VaxkNmdSRaTQ== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D5315EA809E5E52714817D375E6B2C42113B099E9CF96928D1B92326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, I've checked the patchset into all long-term branches in tarantool/luajit and bumped a new version in master, release/2.11 and release/2.10. On 29.08.23, Sergey Kaplun via Tarantool-patches wrote: > From: Mike Pall > > Reported by Sergey Kaplun. > > (cherry-picked from commit 0ef51b495f9497aac77b41eb3d837c9c38b9424b) > > Table `NEWREF` storage for non-constant keys also emits `FREF` IR with > `IRFL_TAB_NOMM` to invalidate the metamethod cache. When table creation > and `NEWREF` are sinked, the corresponding `FSTORE` is sinked too and > should be restored on trace exit. However, `snap_unsink()` doesn't > expect anything except `IRFL_TAB_META` as the second operand of `FREF`, > so the corresponding assertion fails. > > This patch adds a switch-case statement to handle the `IRFL_TAB_NOMM` > case. Since `FREF` with `IRFL_TAB_NOMM` always follows some hash store, > we can avoid a duplication of the cache invalidation, so this case just > does nothing. > > 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-1052-unsink-with-irfl-tab-nomm > Tarantool PR: https://github.com/tarantool/tarantool/pull/9055 > Related issues: > * https://github.com/LuaJIT/LuaJIT/issues/1052 > * https://github.com/tarantool/tarantool/issues/8825 > > src/lj_snap.c | 18 +++++++--- > ...lj-1052-unsink-with-irfl-tab-nomm.test.lua | 36 +++++++++++++++++++ > 2 files changed, 49 insertions(+), 5 deletions(-) > create mode 100644 test/tarantool-tests/lj-1052-unsink-with-irfl-tab-nomm.test.lua > > -- > 2.42.0 > -- Best regards, IM