Re: CVS tip problems

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: olly(at)lfix(dot)co(dot)uk, pgsql-hackers(at)postgresql(dot)org
Subject: Re: CVS tip problems
Date: 2004-06-01 02:01:34
Message-ID: 200406010201.i5121YV20052@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
> > On Mon, 2004-05-31 at 19:55, Tom Lane wrote:
> >> I can't duplicate that here. It looks to me like the probable
> >> explanation is a broken or incompatible version of strerror_r() on your
> >> machine. Does the failure go away if you build without thread-safety?
>
> > Yes it does.
> > I'll see if I can run with a debugging libc and find it.
>
> First you might want to check which flavor of strerror_r() your platform
> has --- does it return int or char* ? The Linux man page for
> strerror_r() says
>
> strerror_r() with prototype as given above is specified by SUSv3, and
> was in use under Digital Unix and HP Unix. An incompatible function,
> with prototype
>
> char *strerror_r(int errnum, char *buf, size_t n);
>
> is a GNU extension used by glibc (since 2.0), and must be regarded as
> obsolete in view of SUSv3. The GNU version may, but need not, use the
> user-supplied buffer. If it does, the result may be truncated in case
> the supplied buffer is too small. The result is always NUL-terminated.
>
> The code we have appears to assume that the result will always be placed
> in the user-supplied buffer, which is apparently NOT what the glibc
> version does.

What does "may, but need not, use the user-supplied buffer" supposed to
mean in practical terms. How do they expect us to use it?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-06-01 02:03:08 Re: Fast index build vs. PITR
Previous Message Christopher Kings-Lynne 2004-06-01 01:53:38 Re: Fast index build vs. PITR

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-06-01 02:10:04 Re: CVS tip problems
Previous Message Bruce Momjian 2004-06-01 01:27:43 Re: [HACKERS] New pg_ctl has retrogressed in error messages