Skip site navigation (1) Skip section navigation (2)

Re: BUG #6672: Memory leaks in dumputils.c

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: Anna Zaks <zaks(dot)anna(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6672: Memory leaks in dumputils.c
Date: 2012-06-04 23:14:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
On fre, 2012-06-01 at 21:26 -0700, Josh Kupershmidt wrote:
> It's too bad the clang
> doesn't understand our ereport(ERROR, ...) calls don't return to the
> caller, as those seem to account for a fair bit of the spurious
> warnings. I haven't seen anything which I'd call an outright bug,
> though there are e.g. non-kosher uses of malloc() which could
> certainly be improved.
> Hrm, I wonder if proc_exit() and ExitPostmaster() could be declared
> with __attribute__((noreturn)) , that seems like it would quiet a few
> errors. 

I have a few in-progress patches for this that I didn't finish for 9.2.
(Some noreturn bits already went into 9.2.)  proc_exit() and
ExitPostmaster() are low-hanging fruit, but then there is the whole
PostgresMain(), PostmasterMain(), GucInfoMain(), WalSenderMain() line of
functions (for which I have a patch), then the elog/ereport issue (for
which I have a patch, but it could be controversial), and then the
Assert() issue (which seems more difficult to solve, because you can
turn off assertions at run time, so you can't guarantee anything to the
compiler).  I will rebase and submit what I have for the next

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2012-06-05 00:16:25
Subject: Re: Calling xlst_process with certain arguments causes server crash
Previous:From: Jeff DavisDate: 2012-06-04 21:31:01
Subject: Re: BUG #6669: unique index w/ multiple columns and NULLs

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group