Re: patch: garbage error strings in libpq

From: jtv(at)xs4all(dot)nl
To: "Neil Conway" <neilc(at)samurai(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, jtv(at)xs4all(dot)nl, pgsql-patches(at)postgresql(dot)org
Subject: Re: patch: garbage error strings in libpq
Date: 2005-07-08 03:33:53
Message-ID: 18836.202.47.227.25.1120793633.squirrel@202.47.227.25
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Neil Conway wrote:
> Tom Lane wrote:
>> 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.
>
> I think you're missing the point. Obviously the current code is wrong,
> the debate is over the best way to fix it. Jeroen's interpretation of
> the spec suggests that merely having libpq_gettext() preserve errno is
> not sufficient. I'm not convinced this his interpretation is correct,
> but it is a question worth resolving.

Agree totally. If my interpretation is wrong then I'll happily get on
with my life and let everyone else do the same. I was at that point once
already, but Neil took another close look at the relevant part of the C
standard he dug up and found this potential problem.

I really don't like playing the smart-alec language lawyer here, but I've
been following compiler developments and they are moving in a direction
that makes this relevant. I do want to be sure that we're shipping
correct code, not just code that practically speaking suppresses the
symptoms of its bugs for a while, on most compilers, for the most popular
CPU architectures.

Moreover, I don't want to go through all of this again when the regression
occurs and we think we've solved it forever and the problem must be
somewhere else. I've been losing enough sleep over what I thought must be
bugs in libpqxx that I just couldn't put my finger on.

Jeroen

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2005-07-08 04:12:41 Re: Patch to remove deadcode from dbcommands.c
Previous Message Tom Lane 2005-07-08 03:03:40 Re: A couple of p.tches for PostgreSQL 64bit support