Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Leak Sanitizer - how to suppress leaks



Kamil Rytarowski wrote:

> I will revert it, but I am looking for a more generic approach.
>
> How about adding ifdef __NO_LEAKS like:
>
> #ifdef __NO_LEAKS
> free(3)?
> #endif
>
> And in lsan/asan/valgrind/etc checks use -D__NO_LEAKS.

Sorry if I'm missing something that has been already explained,
but why (practically) do we care about memory leaks for a utility
that is about to finish?

If we're doing some ugly #ifdef dance only when running the
sanitiser(s), then we haven't actually done anything to "fix"
the leak in the installed binaries so it seems that there was
no practical problem that we were trying to solve in the first
place.

Cheers,
Simon.


Home | Main Index | Thread Index | Old Index