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



On 16.09.2019 02:47, Robert Elz wrote:
> Expecting any unix program (even the simplest) to simply compile and run
> in a non-kernel environment is pointless, they simply won't work.

As a non-trivial no-kernel example, nethack on rump unikernel:

https://github.com/anttikantee/rumprun-nethack

On 16.09.2019 02:47, Robert Elz wrote:> Also remember, that it is not
only exit (via normal means, via an error
> exit, or even killed by a signal) that requires cleanup, but exec() as
> well.

LSan handles forks with/without exec. If there was a fork(2), without
execing an image, every leaked memory is reported.

On 16.09.2019 02:47, Robert Elz wrote:> doesn't apply, and processes
need to clean up after themselves
> evern when they abort.

Once someone picks the code and tries to make it a long-running process,
it's a matter of reworking abnormal termination code paths into fallbacks.

Everything depends on per-case basis.

Once valgrind/LSan or similar tool will catch more leaks in ps(1), I
will mark them with __NO_LEAKS as I find it more valuable to invest into
tools rather than manual work of squashing leaks.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index