>Do people want patches to quiet AddressSanitizer's leaks detector?
>
>I've started testing my patches with AddressSanitizer.
>By default, ASan produces many errors messages about memory
>leaks in nmh.

So, Robert already commented on this, but my answer is more subtle.

Memory management in nmh is a mess.  This is partially because the code is
old and things weren't such a concern back then, and partially because
(as Robert already pointed out) all of the programs are short-running and
exit very quickly, so even with poor memory management there generally
isn't a real impact.

I personally think this should be cleaned up, because (a) this is just
sloppy and (b) it makes it difficult to create a library that other
packages could use.  This is admittedly a pie-in-the-sky idea.

However, there are a bunch of practical concerns about tracking these
things down.  Specifically, I think many of the relevant APIs aren't
really suited for dealing with this.  One of my other pie-in-the-sky
ideas is to create betters API that would have some defined memory
management , but who knows when that will happen.

That being said ... I _did_ try to do that with, for example, the
netsec API.  If there are memory leaks there, I want to know about them!

I guess I would say, "Give it a shot and we'll see how bad those things
are".  Some things we might fix, others we would just have to live with.
I do know that with programs like valgrind, for example, you can define
things to ignore; if ASan has that, we could maybe just ignore the things
we are going to live with.

--Ken

Reply via email to