public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: "Dmitry V. Levin" <ldv@altlinux.org>, elfutils-devel@sourceware.org
Subject: Re: [PATCH v2] findtextrel: do not use unbound alloca
Date: Thu, 09 Sep 2021 18:40:23 +0200	[thread overview]
Message-ID: <4dfbb9614750b31ed4b5a10d27d759c98df7241b.camel@klomp.org> (raw)
In-Reply-To: <20210909113127.GA29171@altlinux.org>

Hi Dmitry,

On Thu, 2021-09-09 at 14:31 +0300, Dmitry V. Levin wrote:
> This fixes the following compilation warning:
> 
> findtextrel.c:184:1: warning: stack usage might be unbounded [-
> Wstack-usage=]
> 
> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
> ---
> 
>  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
> 

      reply	other threads:[~2021-09-09 16:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06 18:00 [PATCH] " Dmitry V. Levin
2021-09-08 22:22 ` Mark Wielaard
2021-09-09 11:31 ` [PATCH v2] " Dmitry V. Levin
2021-09-09 16:40   ` Mark Wielaard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4dfbb9614750b31ed4b5a10d27d759c98df7241b.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=ldv@altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).