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

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: BUG #6672: Memory leaks in dumputils.c
Дата
Msg-id 1338851678.7854.22.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: BUG #6672: Memory leaks in dumputils.c  (Josh Kupershmidt <schmiddy@gmail.com>)
Список 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
commitfest.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: BUG #6669: unique index w/ multiple columns and NULLs
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Calling xlst_process with certain arguments causes server crash