[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fix memory leaks and enable ASAN/UBSAN
From: |
Assaf Gordon |
Subject: |
Re: fix memory leaks and enable ASAN/UBSAN |
Date: |
Mon, 6 Aug 2018 16:13:35 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Hello,
Thanks for the review.
On 06/08/18 02:04 AM, Jim Meyering wrote:
On Sun, Aug 5, 2018 at 7:12 AM, Assaf Gordon <address@hidden> wrote:
Attached few patches that fix memory leaks.
Most are not critical, and only enabled with DEBUG_LEAKS.
But one does need review, I suspect it is a runtime leak.
Did you consider using the "lint" cpp symbol, along with its IF_LINT
for single-line suppressions? That is what coreutils does. Spurious
leaks are just another type of "lint" after all.
Good point.
"DEBUG_LEAKS" was introduced in 1999 (based on the ChangeLog).
The attached patch replaces all instances of DEBUG_LEAKS with lint.
Re your question in "sed: fix memory leak", I agree: that is indeed a
real leak, and worth fixing unconditionally. Good catch.
Thanks for looking into that.
The updated patch makes it unconditional.
comments welcomed,
- assaf
sed-sanitize-3.patch
Description: Text Data