autoconf-patches
[Top][All Lists]
Advanced

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

Re: Fix memoryleak in conftest.c


From: Paul Eggert
Subject: Re: Fix memoryleak in conftest.c
Date: Thu, 31 Mar 2022 23:32:38 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

On 3/31/22 02:31, Raphael Isemann wrote:
the obvious memory leak here is causing problems
with a downstream compiler (the compiler is more strict about memory
leaks and keeps generating warnings when used in autoconf projects
that compile this file during configure)

Usually there's a way to suppress these false alarms, e.g., by configuring with the appropriate CFLAGS. It's not a bad idea to do that with mature code, as the leak diagnostics are typically more trouble than they're worth. The GNU Coding standards say,

"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." <https://www.gnu.org/prep/standards/html_node/Memory-Usage.html>


All that being said, I installed the attached to try to help out, sometime in the distant future when everyone has upgraded to some future version of Autoconf.

Attachment: 0001-Work-around-memory-leak-false-alarms.patch
Description: Text Data


reply via email to

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