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 45E8F6ECE3; Thu, 30 Jun 2022 15:15:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 45E8F6ECE3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1656591338; bh=UElpZ/KTVImvx/1qZ8MEUkA5hG2L2ezJ+AENwbbcvL4=; 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=vHWHp6kthfl2oRwjVLX/hp/orZoDOaeSxr4/eckcu7iUFHMY3L4THTl3RCYTE4Qio JZhLw8mPCiBuZTAs4Wd01fohf/JmK5vAd2dDE/pBnFqJOKcFNAmHDvLdbzAy7NRqTt 4VuNqyypyYoWvGjVVV8NeBOhOiKfoCzt8tBgNItg= 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 BBBDD6ECE3 for ; Thu, 30 Jun 2022 15:15:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BBBDD6ECE3 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1o6t55-0006Kz-Lz; Thu, 30 Jun 2022 15:15:36 +0300 Date: Thu, 30 Jun 2022 15:08:24 +0300 To: Sergey Kaplun Message-ID: References: <20211022114653.4225-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211022114653.4225-1-skaplun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9F05DDD76985F9126E1DDAE1C6EB0772846459A7F84F1DAA6182A05F538085040E95E71A74EB7C9220EA3A30F8F446DE0B45F958FC9730D3CD508F9FA4498EAD1 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F68DA2F3749BB650EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378D071468F2F69688EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38B8859CA687ABA27BAE2FC3AE33ED1F6DC802ADB8D49115BB4CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F790063793270F7220657A0A389733CBF5DBD5E9B5C8C57E37DE458B9E9CE733340B9D5F3BBE47FD9DD3FB595F5C1EE8F4F765FC72CEEB2601E22B093A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E735BA6625F88748EAEFC4224003CC83647689D4C264860C145E X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: 9604B64F49C60606AD91A466A1DEF99B296C473AB1E14218C6CDE5D1141D2B1CE327B8A3FCA1300ECF09212A5215BF19B8773B3A3FA92385AD91A466A1DEF99B296C473AB1E14218B936CB490224F2464EEA7BD89490CAC0EDDA962BC3F61961 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34AEC7C2AC3C44791DEFE1061EC50E5D76E0D101A8F74F2EFB6901832B5095374B61EC90BE0A347F581D7E09C32AA3244C6A91231CB93151C6428BBC46FAE89CC98580396430872480927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojhvrbUd41KJmI7dCklA8Mjg== X-Mailru-Sender: 689FA8AB762F7393CC2E0F076E87284E90CAC529EDC7E7853F9FF04E9ACB5C74A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E3365FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] Add missing LJ_MAX_JSLOTS check. 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 master, 2.10 and 1.10. On 22.10.21, Sergey Kaplun wrote: > From: Mike Pall > > Thanks to Yichun Zhang. > > (cherry picked from commit 630ff3196a06353c6a7ccd1e9ac3958f4a8ca13c) > > Before the patch, JIT compiler doesn't check slots overflow for > recording of metamethods call. So the assertion in `rec_check_slots()` > checking that we don't overflow the slots limit (the limit > `LJ_MAX_JSLOTS` is 250) is failing, when we record metamethod call > (`J->baseslot` diff + `J->maxslot` ~ 5-8 stack slots), while almost all > slots of JIT engine are occupied. > > This patch adds the corresponding check in `lj_record_call()`. > > Sergey Kaplun: > * added the description and the test for the problem > --- > > Tarantool branch: https://github.com/tarantool/tarantool/tree/skaplun/gh-noticket-fix-slot-check-for-mm-record > Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-fix-slot-check-for-mm-record > > src/lj_record.c | 2 + > .../fix-slot-check-for-mm-record.test.lua | 81 +++++++++++++++++++ > 2 files changed, 83 insertions(+) > create mode 100644 test/tarantool-tests/fix-slot-check-for-mm-record.test.lua > > -- > 2.31.0 > -- Best regards, IM