bug-gnulib
[Top][All Lists]
Advanced

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

Re: memory leaks in gnulib tests (for ASAN/LINT)


From: Paul Eggert
Subject: Re: memory leaks in gnulib tests (for ASAN/LINT)
Date: Tue, 9 Oct 2018 10:37:15 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Tim Rühsen wrote:
The GNU standards [1] say so as well:
   "Memory analysis tools such as valgrind can be useful, but don’t complicate
    a program merely to avoid their false alarms. For example, if memory is used
    until just before a process exits, don’t free it simply to silence such a 
tool."
This is wrong and ignorant in several ways. It really hurts.

Sorry that it hurts, but any guideline or policy in this area will step on *somebody's* toes. And this guideline wasn't chosen out of ignorance.

If we want to silence these diagnostics we can either complicate the source code or complicate the debugging tool. In cases like these I'd rather complicate the debugging tool, as that is easier to maintain than adding complexity to all the source-code programs that the tool is applied to. Besides, debugging tools come and go, but source code lasts forever.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]