dbTalk Databases Forums  

[BUGS] BUG #2778: make check failed

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


Discuss [BUGS] BUG #2778: make check failed in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alex Deiter
 
Posts: n/a

Default [BUGS] BUG #2778: make check failed - 11-24-2006 , 03:08 PM







The following bug has been logged online:

Bug reference: 2778
Logged by: Alex Deiter
Email address: tiamat (AT) komi (DOT) mts.ru
PostgreSQL version: 8.1.5
Operating system: Solaris 9 sparc
Description: make check failed
Details:

System detail:

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
....
$ make && make check
....
=======================
1 of 98 tests failed.
=======================

The differences that caused some tests to fail can be viewed in the
file `./regression.diffs'. A copy of the test summary that you see
above is saved in the file `./regression.out'.

$ less src/test/regress/regression.diffs
*** ./expected/errors.out Sat Feb 12 01:15:11 2005
--- ./results/errors.out Thu Nov 23 18:14:08 2006
***************
*** 300,308 ****
select 1/0::int8;
ERROR: division by zero
select 1::int2/0;
! ERROR: division by zero
select 1/0::int2;
! ERROR: division by zero
select 1::numeric/0;
ERROR: division by zero
select 1/0::numeric;
--- 300,310 ----
select 1/0::int8;
ERROR: division by zero
select 1::int2/0;
! ERROR: floating-point exception
! DETAIL: An invalid floating-point operation was signaled. This probably
means
an out-of-range result or an invalid operation, such as division by zero.
select 1/0::int2;
! ERROR: floating-point exception
! DETAIL: An invalid floating-point operation was signaled. This probably
means
an out-of-range result or an invalid operation, such as division by zero.
select 1::numeric/0;
ERROR: division by zero
select 1/0::numeric;

================================================== ====================

i found cause of this error:

#include <stdio.h>

int testdiv(int i, long k) {
if (k == 0) printf("found divide by zero\n");
return(i/k);
}

int main() {
int i = testdiv(1,0);
return(i);
}

when compile it without optimization, it works fine:
$ gcc t.c
$ ./a.out
found divide by zero
Arithmetic Exception (core dumped)

but optimization break it:
$ gcc -O3 t.c
$ ./a.out
Arithmetic Exception (core dumped)

Thanks a lot!

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

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.