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 1AB2E741FA; Fri, 6 Aug 2021 11:33:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1AB2E741FA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1628238825; bh=paz2V3qvAXFgaOCzo+dJ0/Adlo43yNon9FJc75/EyG8=; 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=RqDAl3qvR4saPUS1SdavNffJQ9FM2SCuJ9cpGb4V2JuD9gTop7B+Afg7y5c8pqZ4+ EF++Ga3H1cU+7Sie+1szd57og/eL1RQgNHHNuHqG6bKF9cibfzCsIqHvK8iry1M95D BDg4BfRcHo0cDrgebJYk8DoLTVqVIWNbw++WOT0k= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (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 763CC741FA for ; Fri, 6 Aug 2021 11:33:44 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 763CC741FA Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1mBvIV-0007ca-Oc; Fri, 06 Aug 2021 11:33:44 +0300 Date: Fri, 6 Aug 2021 11:33:41 +0300 To: mechanik20051988 Cc: v.shpilevoy@tarantool.org, tarantool-patches@dev.tarantool.org, mechanik20051988 Message-ID: <20210806083341.ycjbgb3vcdv6rbrl@esperanza> References: <9283d4de4f1cfdc3a912d2730b8303ea7ff52b2b.1628184138.git.mechanik20.05.1988@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9283d4de4f1cfdc3a912d2730b8303ea7ff52b2b.1628184138.git.mechanik20.05.1988@gmail.com> X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD94BB7C0677F3ED9D05EB08EAFC9298EA6182A05F538085040F0F9D6CDEFE6E10D4BFA2F048F0C1DC6351A5AF4BB8D83C56D575EBB065D23AC X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7811C3E343B302E2EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063726CA83C7ABDB938E8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D872056343A4C36FA086D1826E35FED438117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCEA77C8EAE1CE44B0A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352026055571C92BF10F2CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6A45692FFBBD75A6A089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A55585BF5E37C274F3B891B478D0723A6EA5B7771CBAAAA0B0D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7501A9DF589746230F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34C264B329661203DA4E01C9568DD801E931BD5AFD6F80F12F9E2737F2B29A96D4C642D425E1C1997D1D7E09C32AA3244C823490F46B3BE3C1B42F58F068E9D8F8A8CE788DE683120583B48618A63566E0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojFhlvmGwdUwTkt6rJYpqr4g== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DD80EAD267F63B9235F1C17AAB28E5FFD274CEFED1673C562683ABF942079399BFB559BB5D741EB966A65DFF43FF7BE03240331F90058701C67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 2/7] salad: fix segfault in case when mhash table allocation failure 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: Vladimir Davydov via Tarantool-patches Reply-To: Vladimir Davydov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Thu, Aug 05, 2021 at 09:17:40PM +0300, mechanik20051988 wrote: > From: mechanik20051988 > > There was no check for successful memory allocation in `new` and `clear` > functions for mhash table. And if the memory was not allocated, a null > pointer dereference occured. > --- > src/lib/salad/mhash.h | 99 +++++++++++++++++++++++++++--------------- > test/unit/mhash_body.c | 4 +- > 2 files changed, 66 insertions(+), 37 deletions(-) LGTM ( But as I said before, I don't think we should have bothered )