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 836734F18AF; Mon, 3 Jul 2023 11:32:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 836734F18AF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1688373167; bh=W+yg+KnorCXMGJ+ZxhbLtu7UwNaSgBrfoS5/IJO2taw=; 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=QhN0uiLqWunzffOf0xO7RbdtDYYKdedreM71rZZMj0HbFsK7Vihd/hkr0gPxGVugC sDo3xheIbXngxjR5B84FqAaf9npE2IJVfXVho+21OPvvoRrZ7AzQp/4pSg/Om8Wz42 ONb6dwAfC0+iWNUhr+PvQ81G0kCPFLXMhRxZxfEI= Received: from smtp61.i.mail.ru (smtp61.i.mail.ru [95.163.41.99]) (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 8D7AC258C8C for ; Mon, 3 Jul 2023 11:32:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8D7AC258C8C Received: by smtp61.i.mail.ru with esmtpa (envelope-from ) id 1qGEzE-0030W6-JU; Mon, 03 Jul 2023 11:32:45 +0300 Date: Mon, 3 Jul 2023 08:24:05 +0000 To: Maxim Kokryashkin Message-ID: References: <20230531132806.216178-1-m.kokryashkin@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230531132806.216178-1-m.kokryashkin@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9F8F06A4ADC2A029E60F9D100B8369818031B41F907F22689182A05F5380850405AEECF363BF8B4BE605C99E5525325ABCA4DC1EA90AC075E1A5936951641ADFE X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7548C33FFD72831AFEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006370FDF1CE57EA9D07C8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D84409D1D0C18CD94B7F666CF7760F6987117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520C65AC60A1F0286FE618001F51B5FD3F9D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE91ADC097FE2C3A08C67AC315686ED4D3D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE398E93883770458352D242C3BD2E3F4C6C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947C062BEEFFB5F8EA3E2E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89FB26E97DCB74E625235872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A5AF747CBE68FBBD1FF3E44F6CAC2885A47599662A02FCB066F87CCE6106E1FC07E67D4AC08A07B9B0DB8A315C1FF4794DBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF4BB9FD2364AC6E4F8EE619EE1AA416A0A40709368863CAE43EB5AD50FCB30B98DE1AF985A89825B609C04BAA40F94CC3E898F37F753D61F8D1B06FCEA3A99562A74DFFEFA5DC0E7F02C26D483E81D6BEECAEF3E2CCC1ED8C383653B6C8D9AE0FD16FCAA6493B703A X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojqbm8KbRhf34oDXaVo7mpkA== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D531D99F7DAFF222846ADDBE3B868389FC14505084CBCC95E4E52326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] Fix memory probing allocator to check for valid end address, too. 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" Max, Thanks for the patch! LGTM, after the fixes for the comments left by Sergey. On 31.05.23, Maxim Kokryashkin via Tarantool-patches wrote: > From: Mike Pall > > (cherry-picked from commit 646148e747759f0af3b47f9bd287cedd7e174631) > > Before the patch `mmap_probe` only checked if the allocated chunk > start was within the 2^LJ_ALLOC_MBITS bytes region. However, if the > chunk is big enough, its end can reach outside of that region. This > patch adds the corresponding check, to avoid such situations. > > Maxim Kokryashkin: > * added the description and the test for the problem > > Part of tarantool/tarantool#8516 > --- > Branch: https://github.com/tarantool/luajit/tree/fckxorg/lj-445-fix-memory-probing-allocator > PR: https://github.com/tarantool/tarantool/pull/8720 > LuaJIT issue: https://github.com/LuaJIT/LuaJIT/issues/445 > > src/lj_alloc.c | 3 +- > ...-445-fix-memory-probing-allocator.test.lua | 32 +++++++++++++++++++ > 2 files changed, 34 insertions(+), 1 deletion(-) > create mode 100644 test/tarantool-tests/lj-445-fix-memory-probing-allocator.test.lua > > -- > 2.40.1 > -- Best regards, IM