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 E05A153B85B; Mon, 24 Jul 2023 13:46:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E05A153B85B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1690195567; bh=ygXCyLWazYQP/hRa6rcMsDvegDhx5pbqHdkuBH3uBno=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=ngbsXaT9LBm/1Tt8FjqQ4i4NUf+oSuAQISSu6CkeqX6s91KKseYpaxE/ksQDxfUGr qCRhU8abbr9EbqnNKxhQq+1OyXUcfX8euyJUVee2FbxUQOG/SX5y0MJKZEBTIDKZNB nCCoqHam6kRPNUYaP/Y17P1TSKe4+zYDSjLUyCP8= Received: from smtp30.i.mail.ru (smtp30.i.mail.ru [95.163.41.71]) (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 11BAF53B85B for ; Mon, 24 Jul 2023 13:46:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 11BAF53B85B Received: by smtp30.i.mail.ru with esmtpa (envelope-from ) id 1qNt4n-00A0m0-DF; Mon, 24 Jul 2023 13:46:05 +0300 Message-ID: <5d0cc6ee-69eb-9870-357f-ff020c89fd35@tarantool.org> Date: Mon, 24 Jul 2023 13:46:04 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: Igor Munkin , Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org References: <4f1b53eae2355844a92444570d79761db44fa622.1689925402.git.imun@tarantool.org> In-Reply-To: <4f1b53eae2355844a92444570d79761db44fa622.1689925402.git.imun@tarantool.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9227D43F3CB451B410BF03CE1B48E4F6DE839A4FE7D2C1877182A05F5380850407484B2930CD042D7E8FF05BEDDB3555AF795AE2BDE2B75DA3835935287572018 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE741DC22BF90A736D8EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006370BACBAB4C30C4AEB8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8AB78707FF0D89D1DF53480899A908194117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520437C869540D2AB0F6FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE9647ADFADE5905B12AE38A8E97BAFFB1D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE3632EDEA9CD5989A3302FCEF25BFAB345C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947C1D471462564A2E192E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89F3695E42C86E34F97089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5727B2D8FA090C45E57A9956F867A9301F0A51269514DD834F87CCE6106E1FC07E67D4AC08A07B9B02A336C6518635091CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFFDB4CC3F8C12BC353EEE9F5502B8E24E49519A2E0D04117EB9CA26A3A83C85F145AE5861559675EDC81315DA36159FFB21A8ABD1309796F87FF847AB5CFDB055E48CAC7CA610320002C26D483E81D6BE0DBAE6F56676BC7117BB6831D7356A2DEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojHVt7enifY/u5z1AivMn+jA== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A769386DDCC8D5F3D4FFE8FF05BEDDB3555A6565FCDE7E403FA1EBA65886582A37BD66FEC6BF5C9C28D98A98C1125256619760D574B6FC815AB872D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v2 2/5] memprof: remove invalid assertions 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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for the patch! LGTM On 7/21/23 11:12, Igor Munkin wrote: > The assertions checking the state of the allocator, being replaced by > memory profiler, against NULL can fail if this allocator requires no > internal state (e.g. glibc functions for allocating dynamic memory). In > fact, when building LuaJIT with LUAJIT_USE_SYSMALLOC option enabled, > NULL is given as the second parameter to and these > assertions fail as a result. Hence, they are simply removed. > > Follows up tarantool/tarantool#5442 > Needed for tarantool/tarantool#5878 > > Signed-off-by: Igor Munkin > --- > src/lj_memprof.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/src/lj_memprof.c b/src/lj_memprof.c > index 8cab8204..c600c4f0 100644 > --- a/src/lj_memprof.c > +++ b/src/lj_memprof.c > @@ -295,7 +295,6 @@ int lj_memprof_start(struct lua_State *L, const struct lj_memprof_options *opt) > oalloc->allocf = lua_getallocf(L, &oalloc->state); > lua_assert(oalloc->allocf != NULL); > lua_assert(oalloc->allocf != memprof_allocf); > - lua_assert(oalloc->state != NULL); > lua_setallocf(L, memprof_allocf, oalloc->state); > > return PROFILE_SUCCESS; > @@ -328,7 +327,6 @@ int lj_memprof_stop(struct lua_State *L) > > lua_assert(memprof_allocf == lua_getallocf(L, NULL)); > lua_assert(oalloc->allocf != NULL); > - lua_assert(oalloc->state != NULL); > lua_setallocf(L, oalloc->allocf, oalloc->state); > > if (LJ_UNLIKELY(lj_wbuf_test_flag(out, STREAM_STOP))) {