Source-Changes-D archive

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

Re: CVS commit: src/bin/ps

On 11.09.2019 21:03, Robert Elz wrote:
>     Date:        Wed, 11 Sep 2019 17:02:53 +0000
>     From:        "Kamil Rytarowski" <>
>     Message-ID:  <>
>   | Free it when no longer used, just before the program termination.
> Can we please avoid this kind of nonsense.   Everything is freed when
> every program exits - doing explicit free() calls makes the program bigger
> and slower for no reason at all.
> By all means fix places where memory is truly leaked (whenre more is
> continuously allocated, and simply discarded) but anything that is supposed
> to remain until program exit should simply go away when the exit happens.
> If the canitisers cannot be instructed to ignore such things, they are
> much less useful tan they could be.
> kre

Every leak detector works in the same way.

We have got even fixups in libc for such "nonsense" cases.

A workaround would be to use either __lsan_disable() or
__lsan_ignore_object() from lsan_interface.h. But it won't handle leaks
from other tools such as Valgrind. Also better to use the standard free(3).

Attachment: signature.asc
Description: OpenPGP digital signature

Home | Main Index | Thread Index | Old Index