Re: Coverity reports looking good - Mailing list pgsql-hackers

From mark@mark.mielke.cc
Subject Re: Coverity reports looking good
Date
Msg-id 20060820183007.GA6278@mark.mielke.cc
Whole thread Raw
In response to Re: Coverity reports looking good  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sun, Aug 20, 2006 at 11:52:53AM -0400, Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.org> writes:
> > Whats basically left is a large number of memory leaks in frontend
> > applications such as pg_dump, initdb, pg_ctl, etc. These haven't ever
> > really been a priority (buildACLCommands is really bad in this
> > respect).
> Well, if Coverity's idea of good programming practice is that every
> program must explicitly free everything it ever malloced before it
> terminates, then I'm afraid we'll have to agree to disagree.  The
> above is nothing but make-work as far as programs with short intended
> runtimes go.  A leak in psql would be interesting if it can accumulate
> across command-execution cycles, but I have zero interest in "cleaning
> up" any of the programs mentioned above.

Each of the reported issues should be investigated, for however short, to
see whether it is intentional or not.

For example, if the memory is allocated within a loop, or which the bounds
are not fixed, even a short running program can benefit from being fixed.

If it is just configuration data represented in memory, created once,
who cares... :-)

Cheers,
mark

-- 
mark@mielke.cc / markm@ncf.ca / markm@nortel.com     __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada
 One ring to rule them all, one ring to find them, one ring to bring them all                      and in the darkness
bindthem...
 
                          http://mark.mielke.cc/



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_dump versus SERIAL, round N
Next
From: "Magnus Hagander"
Date:
Subject: Re: Windows 2000 Support