From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCH] unified frontend support for pg_malloc et al and palloc/pfree mulation (was xlogreader-v4) |
Date: | 2013-01-11 21:18:37 |
Message-ID: | 20130111211837.GA31364@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2013-01-11 16:16:58 -0500, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > On 2013-01-11 15:52:19 -0500, Tom Lane wrote:
> >> I agree the scenario doesn't seem all that probable, but what scares me
> >> here is that if we use "__builtin_constant_p(elevel) && (elevel) >= ERROR"
> >> in some builds, and just "(elevel) >= ERROR" in others, then if there is
> >> any code with a multiple-evaluation hazard, it is only buggy in the
> >> latter builds. That's sufficiently nasty that I'm willing to give up
> >> an optimization that we never had before 9.3 anyway.
>
> > Well, why use it at all then and not just rely on
> > __builtin_unreachable() in any recent gcc (and llvm fwiw) and abort()
> > otherwise? Then the code is small for anything recent (gcc 4.4 afair)
> > and always consistently buggy.
>
> Uh ... because it's *not* unreachable if elevel < ERROR. Otherwise we'd
> just mark errfinish as __attribute((noreturn)) and be done. Of course,
> that's a gcc-ism too.
Well, I mean with the double evaluation risk.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-01-11 21:28:13 | Re: [PATCH] unified frontend support for pg_malloc et al and palloc/pfree mulation (was xlogreader-v4) |
Previous Message | Tom Lane | 2013-01-11 21:16:58 | Re: [PATCH] unified frontend support for pg_malloc et al and palloc/pfree mulation (was xlogreader-v4) |