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 8BC946ECE3; Wed, 24 Nov 2021 01:01:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8BC946ECE3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1637704866; bh=IhGrXyq059Z1rzdpPUkzWeYFp7+Ct3M8kU4GMaV610s=; 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=dpgcIuqPWx5HHCHKuJJ9WfTiDG2jrSn3V65vhWaBoOvgjoqNtmTD1qkJMMPyLF52L THDzaM1RpCxzbZVtikBRI5a3dmWS+aMGQKd5GwoNKAyXIG3LIBdkccl2ziK/SEraTJ M6eCW1OHwNNnqD8v0DUPhbfUmE/vjxDu/2Mheoc4= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 3E7D26ECE3 for ; Wed, 24 Nov 2021 01:01:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3E7D26ECE3 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1mpdqY-0006XP-8R; Wed, 24 Nov 2021 01:01:02 +0300 Date: Wed, 24 Nov 2021 01:00:31 +0300 To: Sergey Kaplun Message-ID: References: <20211119164157.18344-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211119164157.18344-1-skaplun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9FE0487E502468146DE9D5261128A1063E979179EAE55CF1E182A05F53808504098D18352AE1B4FF0BB756C8E13B5B7275D419DC1B7426DADEAAFE5DDC2494280 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7DB84ED444C624799EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637BC4B0F5721B555078638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D86B4E5E32DDA3140219986C0054E51207117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BAA867293B0326636D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C3CE9959E2676FD87735872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC345847D397C50E778A33F078A371151D42C66C527B140E23A97FEE90AFEA5773FB1A X-C1DE0DAB: 0D63561A33F958A55092FDA47D83354968BE94367677FC03BD66E17CBE2EF3AED59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA759F66ED85EB5F25FD410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34738A88CA0C70A558E07BC18739A107BA862D284A293E5D1821ABC4545472AF698E9FB6F1A7BA779E1D7E09C32AA3244C3DAF162954B13969672DFAA66997A85DA95CA90A1D8AC565927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojFw1tprMwPO0qYDKw9qE24A== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DD30D77E454AEF640FFBB7555A06EDB52A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v2] Fix frame traversal for __gc handler frames. 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 patch into all long-term branches in tarantool/luajit and bumped a new version in 1.10, 2.8 and master. On 19.11.21, Sergey Kaplun wrote: > From: Mike Pall > > Reported by Changochen. > > (cherry picked from 53f82e6e2e858a0a62fd1a2ff47e9866693382e6) > > A cframe unwinding is missed for a C protected frame during a search for > an error function to handle a runtime error. It leads to undefined > behaviour or crash, when raising a runtime error on stack with the CP > frame before an error function handler (for example, an error in __gc > handler). > > This patch adds missing unwinding for CP frame. > > Sergey Kaplun: > * added the description and the test for the problem > --- > > LuaJIT issue: https://github.com/LuaJIT/LuaJIT/issues/601 > Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-fix-gc-finderrfunc > Tarantool branch: https://github.com/tarantool/tarantool/tree/skaplun/gh-noticket-fix-gc-finderrfunc > > Changes in v2: > * Create CP and C stack manually in LuaC > > src/lj_err.c | 1 + > test/tarantool-tests/CMakeLists.txt | 1 + > .../lj-601-fix-gc-finderrfunc.test.lua | 35 ++++++++++++ > .../lj-601-fix-gc-finderrfunc/CMakeLists.txt | 1 + > .../lj-601-fix-gc-finderrfunc/mixcframe.c | 55 +++++++++++++++++++ > 5 files changed, 93 insertions(+) > create mode 100644 test/tarantool-tests/lj-601-fix-gc-finderrfunc.test.lua > create mode 100644 test/tarantool-tests/lj-601-fix-gc-finderrfunc/CMakeLists.txt > create mode 100644 test/tarantool-tests/lj-601-fix-gc-finderrfunc/mixcframe.c > > -- > 2.31.0 > -- Best regards, IM