dbTalk Databases Forums  

Re: [BUGS] PostgreSQL 8.1.5: regression tests fail on sparc

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] PostgreSQL 8.1.5: regression tests fail on sparc in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] PostgreSQL 8.1.5: regression tests fail on sparc - 11-24-2006 , 04:08 PM






=?KOI8-R?Q?=E4=C5=CA=D4=C5=D2_=E1=CC=C5=CB=D3=C1=CE=C4=D2 _=F7=C1?= =?KOI8-R?Q?=CC=C5=D2=C9=C5=D7=C9=DE?= <tiamat (AT) komi (DOT) mts.ru> writes:
Quote:
PostgreSQL 8.1.5 have a problem with division by zero on sparc.
Solaris 9 sparc, gcc 4.0.2, 4.1.1:
We've not heard that reported before, so I wonder whether there's not
something broken about your compiler or libc.

The code in question is in int2div() in utils/adt/int.c:

if (arg2 == 0)
ereport(ERROR,
(errcode(ERRCODE_DIVISION_BY_ZERO),
errmsg("division by zero")));

result = arg1 / arg2;

It's a bit hard to see how a compiler could get this wrong, but maybe
it's thinking it can evaluate the division before calling errfinish?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate


Reply With Quote
  #2  
Old   
Zdenek Kotala
 
Posts: n/a

Default Re: [BUGS] PostgreSQL 8.1.5: regression tests fail on sparc - 11-26-2006 , 11:04 AM






Дейтер Александр Валериевич wrote:
Quote:
Hi,

PostgreSQL 8.1.5 have a problem with division by zero on sparc.

Solaris 9 sparc, gcc 4.0.2, 4.1.1:

$ ./configure --enable-thread-safety --disable-nls --without-perl
--without-python --without-krb5 --without-openssl --without-readline
...

I found that you logged this as gcc bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29968

However, SunStudio is much better for SPARC platform and now is free.
GCC does not have good code optimalizer for SPARC.

Zdenek

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.