pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Josh Kupershmidt <schmiddy@gmail.com>
Cc: Anna Zaks <zaks.anna@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6672: Memory leaks in dumputils.c
Date: Tue, 05 Jun 2012 02:14:38 +0300
Message-ID: <1338851678.7854.22.camel@vanquo.pezone.net> (raw)
In-Reply-To: <CAK3UJRE6T_yHDt20QUR8KOD8jcaEbeAM+K3OeoVm8NWOedvmMw@mail.gmail.com>
References: <E1SaDxz-0004Vi-8t@wrigleys.postgresql.org>
	<2620.1338527206@sss.pgh.pa.us>
	<CAK3UJREivjfksWk2KZZMNR3OgEpPvt+RT=ARhQhF9GxkDo7+SQ@mail.gmail.com>
	<CA+=xKSUav_nMDbQ8AFW=GDUPkoWSZyeUM1mWtk=30agWrF8_DQ@mail.gmail.com>
	<CAK3UJREQvkyKxYh1n6jLaRH-Gi+NC14m+z2guX5_Tq2fK5+fuA@mail.gmail.com>
	<CA+=xKSXXKtea-T6Yb8OB=Ra_nav7too3Zwr7hSkeBy2wtD5dLA@mail.gmail.com>
	<CA+=xKSUT2DxHHteiM0qLd-kX_SMa-KzjzOVnYOPgrTJA6zLV0w@mail.gmail.com>
	<CAK3UJRE6T_yHDt20QUR8KOD8jcaEbeAM+K3OeoVm8NWOedvmMw@mail.gmail.com>

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.




view thread (13+ messages)

Message-ID: <1338851678.7854.22.camel@vanquo.pezone.net>
Permalink:  ../1338851678.7854.22.camel@vanquo.pezone.net/
Also on:    postgresql.org/message-id/1338851678.7854.22.camel@vanquo.pezone.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: peter_e@gmx.net, schmiddy@gmail.com, zaks.anna@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: BUG #6672: Memory leaks in dumputils.c
  In-Reply-To: <1338851678.7854.22.camel@vanquo.pezone.net>
  References: <E1SaDxz-0004Vi-8t@wrigleys.postgresql.org> <2620.1338527206@sss.pgh.pa.us> <CAK3UJREivjfksWk2KZZMNR3OgEpPvt+RT=ARhQhF9GxkDo7+SQ@mail.gmail.com> <CA+=xKSUav_nMDbQ8AFW=GDUPkoWSZyeUM1mWtk=30agWrF8_DQ@mail.gmail.com> <CAK3UJREQvkyKxYh1n6jLaRH-Gi+NC14m+z2guX5_Tq2fK5+fuA@mail.gmail.com> <CA+=xKSXXKtea-T6Yb8OB=Ra_nav7too3Zwr7hSkeBy2wtD5dLA@mail.gmail.com> <CA+=xKSUT2DxHHteiM0qLd-kX_SMa-KzjzOVnYOPgrTJA6zLV0w@mail.gmail.com> <CAK3UJRE6T_yHDt20QUR8KOD8jcaEbeAM+K3OeoVm8NWOedvmMw@mail.gmail.com> <1338851678.7854.22.camel@vanquo.pezone.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox