From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 25AA13858C2C for ; Thu, 9 Sep 2021 16:40:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 25AA13858C2C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from tarox.wildebeest.org (83-87-18-245.cable.dynamic.v4.ziggo.nl [83.87.18.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 185803000913; Thu, 9 Sep 2021 18:40:24 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 0DA1B43B1721; Thu, 9 Sep 2021 18:40:24 +0200 (CEST) Message-ID: <4dfbb9614750b31ed4b5a10d27d759c98df7241b.camel@klomp.org> Subject: Re: [PATCH v2] findtextrel: do not use unbound alloca From: Mark Wielaard To: "Dmitry V. Levin" , elfutils-devel@sourceware.org Date: Thu, 09 Sep 2021 18:40:23 +0200 In-Reply-To: <20210909113127.GA29171@altlinux.org> References: <20210906180000.GA19040@altlinux.org> <20210909113127.GA29171@altlinux.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2021 16:40:29 -0000 Hi Dmitry, On Thu, 2021-09-09 at 14:31 +0300, Dmitry V. Levin wrote: > This fixes the following compilation warning: >=20 > findtextrel.c:184:1: warning: stack usage might be unbounded [- > Wstack-usage=3D] >=20 > Signed-off-by: Dmitry V. Levin > --- >=20 > v1 introduced a memory leak, so in v2 I rearranged the code a bit > to make clear the new code does not introduce any memory leaks. Sorry I missed that in my original review. But yes, in the original you only freed on error. Now always. Did the testsuite catch it with configure --enable-valgrind ? Looks good, please apply. Thanks, Mark >=20