BUG #2778: make check failed

From: "Alex Deiter" <tiamat(at)komi(dot)mts(dot)ru>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2778: make check failed
Date: 2006-11-23 15:31:04
Message-ID: 200611231531.kANFV4oc020171@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2778
Logged by: Alex Deiter
Email address: tiamat(at)komi(dot)mts(dot)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!

Browse pgsql-bugs by date

  From Date Subject
Next Message Дейтер Александр Валериевич 2006-11-24 11:22:12 PostgreSQL 8.1.5: regression tests fail on sparc
Previous Message Bruce Momjian 2006-11-23 04:38:12 Re: global symbol conflict in