From: Danny Hu <dannyhu@arista.com>
To: David Howells <dhowells@redhat.com>
Cc: keyrings@vger.kernel.org, dwmw2@infradead.org
Subject: Re: [PATCH 1/2] sign-file: Fix memory leaks in the sign-file tool
Date: Wed, 13 Aug 2025 15:51:03 -0700 [thread overview]
Message-ID: <CAFn2k5AsoZf1znsQqbRs9huX4ccx2v5TGqMidCoHXVpDvk19Og@mail.gmail.com> (raw)
In-Reply-To: <188741.1753212750@warthog.procyon.org.uk>
On Tue, Jul 22, 2025 at 12:32 PM David Howells <dhowells@redhat.com> wrote:
> Why? exit() will clean that up.
You are right that exit() will clean up all allocated memory. However,
when this binary runs within tests instrumented with AddressSanitizer
(ASan) and LeakSanitizer (LSan), these leaks cause the instrumented
tests to fail. This happens even if the program isn't leaking in a way
that would cause long-term resource exhaustion.
The main reason for this change is to satisfy LSan. By doing so, we
avoid false positives in LSan-instrumented test suites, which allows
us to rely on LSan to detect actual, problematic leaks that need
fixing. The alternative would be to omit any tests that use the
`sign-file` binary from LSan instrumentation, but that would mean
sacrificing test coverage, which isn't ideal.
Thanks,
Danny
prev parent reply other threads:[~2025-08-13 22:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 23:45 [PATCH 1/2] sign-file: Fix memory leaks in the sign-file tool Danny Hu
2025-07-18 23:45 ` [PATCH 2/2] sign-file: Extend sign-file tool to allow for certificate to be embedded in the signature Danny Hu
2025-07-22 19:32 ` [PATCH 1/2] sign-file: Fix memory leaks in the sign-file tool David Howells
2025-07-22 20:34 ` Danny Hu
2025-08-13 22:51 ` Danny Hu [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=CAFn2k5AsoZf1znsQqbRs9huX4ccx2v5TGqMidCoHXVpDvk19Og@mail.gmail.com \
--to=dannyhu@arista.com \
--cc=dhowells@redhat.com \
--cc=dwmw2@infradead.org \
--cc=keyrings@vger.kernel.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).