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 A4166266AFE; Wed, 15 Feb 2023 10:00:44 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A4166266AFE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1676444444; bh=9fpUbwTp3aFYP6srro75cGcjh8LX/a7GjRsLvUUDP3M=; 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=VueyULAVXCdS2CL+nUmsgax+fZjtei1gDcxZja+bT0YtP+XJYjeCtp6FmOrtoRO7+ ecTu2jOVAnIEFsAtscmNi6BHNi5NKK/GMxYDceVeESWIr16/OOLpGtQu1kWfDigT2I AvFSe1jkjStqN6hCpVJIMck6/1PSki+cP+LL0MsU= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 859421A4E58 for ; Wed, 15 Feb 2023 10:00:43 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 859421A4E58 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1pSBmU-00069o-IY; Wed, 15 Feb 2023 10:00:43 +0300 Date: Wed, 15 Feb 2023 09:57:10 +0300 To: Maxim Kokryashkin Message-ID: References: <20230210130146.30703-1-skaplun@tarantool.org> <1676425431.818496221@f317.i.mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1676425431.818496221@f317.i.mail.ru> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9806C989EC2150E3379A3C40B9AC0CB6A78DC697FD8BD72D3182A05F538085040A98FD9975DC191CC4916AB11D4D89584D57085A65FAC2E75D686E0DFDE597CC8 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7AED985C8E545F588EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006379C6642364E0E74208638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D879FAD394DFB3ECE816B336517431EDD6117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCE1488AC3D4DED311A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520CCD848CCB6FE560CE5D25F19253116ADD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6A1DCCEB63E2F10FB089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3482189E76C6218D8FB6D2E66A47027ADD422E46481CE665A057189968A664D8FE20B9F2829222F91C1D7E09C32AA3244CBA013030D633FBE80FEAB1BD8BC426AF9CA7333006C390A0FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojeiW+ccsIdaWi9AgKI9SzvA== X-DA7885C5: 3D801E9CAE4D68E2F265DE5A2059AD91F276ED6E8F929BB001B1392A10FF096B262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73933AF1F914F131DBF54D0EC72F82040D5B78C5416076186F220FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] ARM64: Fix pcall() error case. 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 the review! On 15.02.23, Maxim Kokryashkin wrote: > > Hi, Sergey! > LGTM, except for a few nits regarding the commit message. Fixed your comments, the new commit message is the following: | ARM64: Fix pcall() error case. | | Reported by Alex Orlenko. | | (cherry picked from commit b4b2dce9fc3ffaaaede39b36d06415311e2aa516) | | The `pcall()` assembler preambule modifies `RC`, which is mapped to | `x28` (the value is N_args * 8), during the check of the amount of the | given arguments. So, this wrong value being used in the `fff_fallback` | routine leads to a crash on error throwing, because the Lua stack is | incorrectly filled and can't be unwound. | | This patch adds the additional comparison before taking the fallback | branch and modifies `RC` only after this branch. | | Sergey Kaplun: | * added the description and the test for the problem | | Part of tarantool/tarantool#8069 Branch is force-pushed. >   > >  > >>From: Mike Pall > >> > >>Reported by Alex Orlenko. > >> > >>(cherry picked from commit b4b2dce9fc3ffaaaede39b36d06415311e2aa516) > >> > >>The `pcall()` assembler preambule modifies `RC` (`x28`) (N args * 8) > >The «`RC` (`x28`) (N args * 8)» expression is hard to percieve. I suggest > >reformulating it in a way like «modifies `RC`, which is mapped to `x28`, so > >it has value ...». Feel free to ignore. > >>during the check of the amount of the given arguments. So, this wrong > >>value using in the `fff_fallback` routine leading to a crash on the > >Typo: s/using/being used/ > >Typo: s/leading/leads > >Typo: s/on the/on > >>error throwing, because the Lua stack is filled incorrect and can't be > >Typo: s/is filled incorrect/is incorrectly filled/ > >>unwound. > >> > >>This patch adds the additional comparison before taking the fallback > >>branch and modifies `RC` only after this branch. > >> > >>Sergey Kaplun: > >>* added the description and the test for the problem > >> > >>Part of tarantool/tarantool#8069 > >>--- > >-- > >Best regards, > >Maxim Kokryashkin > >  -- Best regards, Sergey Kaplun