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 D742053A8ED; Fri, 21 Jul 2023 11:24:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D742053A8ED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1689927868; bh=ffKR60+1xxwfbSy1eq6+ztrAumM+cumYauPYSPA6o5I=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=GLFfIqG2kLauHLwkVUyrvt6XcZgLO2gq5/2cZR7Edk3Qgl6nGE8XirfWUWojFjpyz eCKBTjsoMcFk/xbUPKOjnUqvT/yczeiq/YN3vckxIREYBVRLUI76gmns6k3aYRBH2h cZ9LqeqDBWt17yXsrr9Xqmeu/6rpQcP37wc6pGHw= Received: from smtp33.i.mail.ru (smtp33.i.mail.ru [95.163.41.74]) (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 EE7C053A8ED for ; Fri, 21 Jul 2023 11:23:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EE7C053A8ED Received: by smtp33.i.mail.ru with esmtpa (envelope-from ) id 1qMlQ7-007UVO-7D; Fri, 21 Jul 2023 11:23:27 +0300 To: Sergey Kaplun , Sergey Bronnikov Date: Fri, 21 Jul 2023 08:12:05 +0000 Message-Id: <4f1b53eae2355844a92444570d79761db44fa622.1689925402.git.imun@tarantool.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9227D43F3CB451B41C680B045355580F9F91DE19E33172CA4182A05F538085040EE8FF1190F459A22CD07DF941D01471D143807C733D0C6CA9B60090B13174CA2 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70C5E0F71D77D667BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B1BE0CF094621A628638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8D066AC144A0883A23215C3652DD165F2117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC60CDF180582EB8FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520D76C6ED7039589DEF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947CDA7BFA4571439BB2302FCEF25BFAB3454AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C386712D2D5FBAF151BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7A3CCBC2573AEBDE1C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A5DF2573218B99E188F1FBBE4910BDE6B5C59CE8AD1C418826F87CCE6106E1FC07E67D4AC08A07B9B04AB4081B6A6C2E079C5DF10A05D560A950611B66E3DA6D700B0A020F03D25A0997E3FB2386030E77 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF86E610361627ACC688E893C76A9168D76824532BC33DA1DC4104ABD8AEB012A1E80DAFFC47B24EFF7A512D943FCE53BF2C6F8B5AE035463C39A0B7B5211F0794A74DFFEFA5DC0E7F02C26D483E81D6BEECAEF3E2CCC1ED8C383653B6C8D9AE0FD16FCAA6493B703A X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojhjdY/2lpWULIcroCy+XK5A== X-Mailru-Sender: 2FEBA92C8E508479FE7B9A1DF348D5312354B6DF3EEE8F140DCA94F66C533A0ABF0F014DE95EE42D2326FE6F2A341ACE0FB9F97486540B4CD9E8847AB8CFED4D9ABF8A61C016C2CFB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: [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: 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" 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))) { -- 2.30.2