Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()

From: Christian Kruse <christian(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Suspicion of a compiler bug in clang: using ternary operator in ereport()
Date: 2014-01-29 08:12:48
Message-ID: 20140129081248.GF24091@defunct.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 28/01/14 22:35, Tom Lane wrote:
> >> Absolutely. Probably best to save errno into a local just before the
> >> ereport.
>
> > I think just resetting to edata->saved_errno is better and sufficient?
>
> -1 --- that field is nobody's business except elog.c's.

Ok, so I propose the attached patch as a fix.

Best regards,

--
Christian Kruse http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
saved_errno.patch text/x-diff 1.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rajeev rastogi 2014-01-29 08:31:54 Re: Add min and max execute statement time in pg_stat_statement
Previous Message KONDO Mitsumasa 2014-01-29 08:03:54 Re: Add min and max execute statement time in pg_stat_statement