[rrdtool-maint] Bug#890466: gcc isinf(1.0/0.0) fails on m68k

Finn Thain fthain at telegraphics.com.au
Thu Feb 15 01:09:50 UTC 2018


On Sun, 11 Feb 2018, Jean-Michel Vourg?re wrote:

> Hi
> 
> Last build of rrdtool failed on m68k, because gcc IEEE stack pre-check fails 
> [1].
> 
> The autoconf runs this:
> 
> #include <stdio.h>
> int main(void){
>    double rrdnan,rrdinf,rrdc,rrdzero;
>    ;
>    /* some math to see if we get a floating point exception */
>    rrdzero=sin(0.0); /* don't let the compiler optimize us away */
>    rrdnan=0.0/rrdzero; /* especially here */
>    rrdinf=1.0/rrdzero; /* and here. I want to know if it can do the magic */
> 	  /* at run time without sig fpe */
>    rrdc = rrdinf + rrdnan;
>    rrdc = rrdinf / rrdnan;
>    if (! isnan(rrdnan)) {printf ("not isnan(NaN) ... "); return 1;}
>    if (rrdnan == rrdnan) {printf ("nan == nan ... "); return 1;}
>    if (! isinf(rrdinf)) {printf ("not isinf(oo) ... "); return 1;}
>    if (! isinf(-rrdinf)) {printf ("not isinf(-oo) ... "); return 1;}
>    if (! rrdinf > 0) {printf ("not inf > 0 ... "); return 1;}
>    if (! -rrdinf < 0) {printf ("not -inf < 0 ... "); return 1;}
>    return 0;
> }
> 
> This returned 0 in previous builds [2], but now we get
> "not isinf(oo)"
> 
> I can't find anything changed upstream in these tests compared to last 
> successfull build.
> 
> Any ideas/thoughts?
> 

This seems to be a regression in Debian's C compiler. I came across a 
similar failure recently, which we found using the 'paranoia' floating 
point test suite from netlib.org.

The C version of 'paranoia' when run on a machine with physical 68882 
works fine when built with an old compiler. And the Fortran version 
(dpara.f) built with a recent f77 compiler also works fine on physical 
68882.

But recent Debian C compilers for m68k don't give the expected results.

BTW, it could be that running test suites on 680x0 emulators is 
contributing to the problem. For example, dpara.f under Qemu prints some 
weird output:

 Searching for overflow threshold:
 Can " z = -y " overflow?  trying it on  y =  -i.f^@^@^@^D^@^@^@E+00
 Seems O.K.
 Overflow threshold is  v =   1.79769313+308
 Overflow saturates at  sat =   i.f^@769313+308

I haven't tried this under Aranym.

[Jean-Michel, Stan, please note that there is a bug tracker entry for this 
issue now, #890466, Cc'd].

> 
> 
> [1] Last failed build:
> https://buildd.debian.org/status/fetch.php?
> pkg=rrdtool&arch=m68k&ver=1.7.0-1&stamp=1518247574&raw=0
> 
> [2] Previous build, sucessfull:
> https://buildd.debian.org/status/fetch.php?
> pkg=rrdtool&arch=m68k&ver=1.6.0-1%2Bb3&stamp=1500859583&raw=0

-- 



More information about the pkg-rrdtool-maint mailing list