Re: patch: garbage error strings in libpq - Mailing list pgsql-patches

From Tom Lane
Subject Re: patch: garbage error strings in libpq
Date
Msg-id 25723.1120658343@sss.pgh.pa.us
Whole thread Raw
In response to Re: patch: garbage error strings in libpq  (Neil Conway <neilc@samurai.com>)
Responses Re: patch: garbage error strings in libpq  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> Right; my interpretation is that the "sequence point before function
> call" rule applies recursively. So in c(a(...), b(...)), there are in
> fact three sequence points, which precede the calls of a, b, and c.
> Shouldn't that be sufficient to ensure that the evaluation of
> libpq_gettext() is not interleaved with the evaluation of the other
> arguments to the printf()?

I think this is all irrelevant language-lawyering; jtv spotted the true
problem which is that we do not protect errno during the *first* call of
libpq_gettext.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Error handling fix in interfaces/libpq/fe-secure.c
Next
From: Neil Conway
Date:
Subject: Re: patch: garbage error strings in libpq