Re: SOLARIS 9 ULTRASPARC BUILD

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: andrea(dot)martano(at)lighthousetc(dot)net, pgsql-bugs(at)postgresql(dot)org
Subject: Re: SOLARIS 9 ULTRASPARC BUILD
Date: 2004-08-11 00:08:33
Message-ID: 20040811000833.GA66303@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Aug 10, 2004 at 03:23:33PM -0400, Tom Lane wrote:
> andrea(dot)martano(at)lighthousetc(dot)net writes:
> > attached are the regression.out and regression.diffs files from make check on a
> > Ultra 2 dual 300MHz CPU running Solaris 9 OS.
>
> This seems quite bizarre: ' -INFINiTY ' works but
> 'infinity' does not? Please try in psql
>
> \set VERBOSITY verbose
> SELECT 'infinity'::float4;
>
> and send along the output.
>
> My best guess about it is that strtod() is actively broken on your
> platform, and is recognizing the "infinity" input but returning an
> incorrect endptr. I seem to recall that we've heard of such bugs
> before. Can you check for any updates from Sun that might affect
> strtod()?

strtod() on Solaris has long returned the wrong endptr when parsing
"infinity". Somebody asked about it in comp.unix.solaris in 1995
and I asked again this morning:

http://groups.google.com/groups?&threadm=4118e611%241_3%40omega.dimensional.com

The response indicates that it's a bug fixed in Solaris 10
but probably not released as a patch in earlier versions.

Here's what I get when I run the above commands using a recently
CVS'ed 8.0.0beta1 on Solaris 9. Interestingly, it works the first
time but not afterwards, perhaps due to the bogus endptr pointing
to memory that's initially zeroed but that gets filled before
subsequent queries.

test=> \set VERBOSITY verbose
test=> SELECT 'infinity'::float4;
float4
----------
Infinity
(1 row)

test=> SELECT 'infinity'::float4;
ERROR: 22P02: invalid input syntax for type real: "infinity"
LOCATION: float4in, float.c:330

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2004-08-11 01:19:18 Re: 8.0.0beta1: -lpthread missing
Previous Message Robert E. Bruccoleri 2004-08-10 23:12:22 Regression failure with PostgreSQL 8beta1 and Intel Itanium 2 C compiler