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 4393E47D29C; Thu, 25 May 2023 09:19:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4393E47D29C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1684995586; bh=NHnnjtSAlNO+M+v5hUW6w98sJp58wP0qq8iK5ReY1h0=; 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=UCkhJeyGxfXTLE8JsYn6zsQN+/n5jxZlvp2O968Z1ekdulRPyj97vxBn0pGMepvSV xKScZ+DpNRxlJfW2qkC0U7a7Kezgywz7IjiURjsWxOkC+nUUnW0a/b8Eyp8va9bbEv dBZ9GlvrBLb5mKXdhD0GfClm+I18zpOYeknAgoBw= Received: from smtp45.i.mail.ru (smtp45.i.mail.ru [95.163.41.83]) (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 6C6674457FC for ; Thu, 25 May 2023 09:19:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6C6674457FC Received: by smtp45.i.mail.ru with esmtpa (envelope-from ) id 1q24Jr-000b96-CU; Thu, 25 May 2023 09:19:27 +0300 Date: Thu, 25 May 2023 06:16:33 +0000 To: Sergey Kaplun Message-ID: References: <20230411203650.10125-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230411203650.10125-1-skaplun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9318AAE2601AA39B8F9E13B3EDDC277FCF2D3D0BFAE7215B300894C459B0CD1B97856F33D5991C17F9B9F730A40A5A28DA30BC3CADC405826F84BCC1498F71492 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78AC0750F3304E924EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006371A00CE7BDCE207EB8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8A3D929A85DB47DE6C2A80CDD759EC4A3117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCCC99A7B061B94ED7A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520B28585415E75ADA9C26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EED76C6ED7039589DE03CEA74F0D118906D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE367F1C1C3ABB44F3A6E0066C2D8992A16C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637427B078F297B269AEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A57F92531546629EEE4CFB189C6457E45317B9EA33B97FD78DF87CCE6106E1FC07E67D4AC08A07B9B06A1CB4668A9CA5FACB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34728AF701C68E45394CA12F564B13EE8CA919FAB8BE01D3A27DD3454165797A07E412AB7B7DF5BE791D7E09C32AA3244CDAC4CFF412F52F170F0444AC9674A1B4408A6A02710B7304927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj7RK+RruQK1f83g98esgyLA== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D53197FB8A270294057A1A03C633F2BF26BD45B6F444B87B18DD2326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] LJ_GC64: Make ASMREF_L references 64 bit. 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, 2.11 and 2.10. On 11.04.23, Sergey Kaplun via Tarantool-patches wrote: > From: Mike Pall > > Reported by Yichun Zhang. > > (cherry picked from commit 850f8c59d3d04a9847f21f32a6c36d8269b5b6b1) > > The `ASMREF_L` reference is defined as `REF_NIL`, so it isn't considered > as 64 bit address. On GC64 mode it may lead to the following assembly: > | mov eax, edi > so, high 32 bits of the reference are lost. > > This patch adds `IRT_NIL` to `IRT_IS64` mask, to consider `ASMREF_L` > 64 bit long. Now the resulting assembly is the following: > | mov rax, rdi > > False-positive `if` condition in is OK, since `op12` > already initialized as 0. > > False-positive `if` condition in , , > is OK, since `REF_NIL` is the last reference before > `REF_BASE` and this iteration of a cycle is still the last one. > > Sergey Kaplun: > * added the description and the test for the problem > > Part of tarantool/tarantool#8516 > --- > > Branch: https://github.com/tarantool/luajit/tree/skaplun/or-144-gc64-asmref-l > Related issues: > * https://github.com/openresty/lua-resty-core/issues/144 > * https://github.com/tarantool/tarantool/issues/8516 > PR: https://github.com/tarantool/tarantool/pull/8553 > ML: https://www.freelists.org/post/luajit/Consistent-SEGV-on-x64-with-the-latest-LuaJIT-v21-GC64-mode > > Don't restrict test case by GC64 mode, because want to test `IR_LREF` > for any mode. Keep GC64 in the test name, to be clear where expect the > SegFault. > > src/lj_asm.c | 1 + > src/lj_ir.h | 4 ++- > src/lj_opt_sink.c | 1 + > .../or-144-gc64-asmref-l.test.lua | 28 +++++++++++++++++++ > 4 files changed, 33 insertions(+), 1 deletion(-) > create mode 100644 test/tarantool-tests/or-144-gc64-asmref-l.test.lua > > -- > 2.34.1 > -- Best regards, IM