Обсуждение: SOLARIS 9 ULTRASPARC BUILD
hello, attached are the regression.out and regression.diffs files from make check on a Ultra 2 dual 300MHz CPU running Solaris 9 OS. Looks like no errorbut the expected due to difference in fp results.
Вложения
andrea.martano@lighthousetc.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()? regards, tom lane
On Tue, Aug 10, 2004 at 03:23:33PM -0400, Tom Lane wrote: > andrea.martano@lighthousetc.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/
On Tue, Aug 10, 2004 at 12:17:47PM +0200, andrea.martano@lighthousetc.net wrote: > > attached are the regression.out and regression.diffs files from make check on a > Ultra 2 dual 300MHz CPU running Solaris 9 OS. > > Looks like no errorbut the expected due to difference in fp results. [snip] > SELECT 'infinity'::float4; > ! ERROR: invalid input syntax for type real: "infinity" Perhaps PostgreSQL doesn't handle a longstanding misbehavior of strtod() on Solaris: when passed "Infinity" or its equivalent, strtod() sets endptr to point one character beyond the terminating null character instead of to the null character itself. I asked about this today in comp.unix.solaris and was told that it's a bug that will be fixed in Solaris 10. Here's a similar report from over nine years ago: http://groups.google.com/groups?&threadm=3oeojn%24jhk%40agate.berkeley.edu The thread I started hasn't showed up at groups.google.com yet, but I think this link will eventually point to it: http://groups.google.com/groups?&threadm=4118e611%241_3%40omega.dimensional.com -- Michael Fuhr http://www.fuhr.org/~mfuhr/