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 5A2AA93AB31; Wed, 10 Jan 2024 11:58:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5A2AA93AB31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1704877087; bh=jpX5NrW6V04494y0Hh2y7TdBe68JZYvmILqRsd8buJY=; 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=IygD4vjePQhZM0JnGh0HRiWJsdTxsjUvtCe+ouiKArShYoW/NVTA8+4PZdzEYAbzL ZQaWG/1EUcwOeB25sTUq/MMrkLDKTJuTrErP+p1r3q1GQe3paNstCoYG0YU2B2MLfk AA3c/WMoltIZ4+ph0oG+EcgoE+F6/44bVdLRkG98= Received: from smtp38.i.mail.ru (smtp38.i.mail.ru [95.163.41.79]) (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 8202D93AB31 for ; Wed, 10 Jan 2024 11:57:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8202D93AB31 Received: by smtp38.i.mail.ru with esmtpa (envelope-from ) id 1rNUP3-009VUK-1n; Wed, 10 Jan 2024 11:57:37 +0300 Date: Wed, 10 Jan 2024 08:51:32 +0000 To: Sergey Kaplun Message-ID: References: <20231114150455.2850-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231114150455.2850-1-skaplun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9F008C97756F746CAE2B75521B1C23978BC5B3227EFB96EBE182A05F538085040BCD17EB11A9AF92277D49CF4EE625CF41490CC03EF7337EDD5A659C0D0F63223 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE73B44982FA5E78411EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B23888C9749F3CAC8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8708C0B9C153F00EC0F6BA9A6B8F1FEE2117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC60CDF180582EB8FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD186FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE9647ADFADE5905B1F206494F22AA87D6D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE34CB6874B0BCFF0B8C0837EA9F3D19764C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947C1D471462564A2E192E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89FD2A95C73FD1EFF4557739F23D657EF2BB5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A508514B81BC8FBEDACC294961F0AAB6747EF99FC0F73872F6F87CCE6106E1FC07E67D4AC08A07B9B065B78C30F681404DCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFAD3738B5EB61A3445CFF219F43FE1F5C0740568287BD3EDB83E8176E3B4E7DC0E5D0AE1B904842155550A38C5D2E6452D0CCC09FCB1806228BA59E325AFBEA84A74DFFEFA5DC0E7F02C26D483E81D6BEECAEF3E2CCC1ED8C383653B6C8D9AE0FD16FCAA6493B703A X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojou3Ii6fsdvVweGF+ghGo4A== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D531DF9CEB243B21FD90F81E92D94937A03A60A0FB66E1C815A52326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] Fix FOLD rule for BUFHDR append. 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 14.11.23, Sergey Kaplun via Tarantool-patches wrote: > From: Mike Pall > > Reported by XmiliaH. > > (cherry-picked from commit bc1bdbf620f58f0978385828bc51272903601e17) > > `bufput_append()` may fold `BUFHDR RESET` + `BUFPUT` IRs to `BUFHDR > APPEND` even if the right operand (`BUFSTR`) is the PHI. If it's not the > last IR in the `BUFSTR` chain, this may lead to an incorrect resulting > value in the buffer, which contains a longer string since `APPEND` is > used instead of `RESET`. > > This patch adds the corresponding check inside the fold rule. > > Sergey Kaplun: > * added the description and the test for the problem > > Part of tarantool/tarantool#9145 > --- > > Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-791-fold-bufhdr-append > Tarantool PR: https://github.com/tarantool/tarantool/pull/9369 > Relate issues: > * https://github.com/LuaJIT/LuaJIT/issues/791 > * https://github.com/tarantool/tarantool/issues/9145 > > src/lj_opt_fold.c | 3 +- > .../lj-791-fold-bufhdr-append.test.lua | 54 +++++++++++++++++++ > 2 files changed, 56 insertions(+), 1 deletion(-) > create mode 100644 test/tarantool-tests/lj-791-fold-bufhdr-append.test.lua > > -- > 2.42.0 > -- Best regards, IM