public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] bug in fmod on trillian [fmod(-10,1) causes core dump]
@ 2000-05-01 18:43 Trent Mick
  2000-05-01 19:35 ` Jim Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Trent Mick @ 2000-05-01 18:43 UTC (permalink / raw)
  To: linux-ia64

I hope that someone appropriate (i.e. someone at Cygnus or someone on
ia64-tools) sees this message.

Some arguments to fmod() cause a segmentation fault on trillian. Examples are
fmod(-10,1), fmod(-10,0.5).


Here is a test case:

-----------> ls
Makefile  fmodbug.c
-----------> cat fmodbug.c
#include <stdio.h>
#include <math.h>

int main(void)
{
        int i;
        double d;

        d = fmod(-10.0, 1.0);
        printf("fmod(-10,1) = %f\n", d);

        return 0;
}
-----------> cat Makefile
all : fmodbug

fmodbug : fmodbug.c
        gcc -lm fmodbug.c -o fmodbug

test :
        ./fmodbug

clean :
        -rm -f fmodbug
        -rm -f core
        -rm -f *~
-----------> make
gcc -lm fmodbug.c -o fmodbug
-----------> make test
./fmodbug
make: *** [test] Segmentation fault (core dumped)
----------->


I would appreciate a reply if this reaches the proper eyes. Or, if someone
can tell me to whom this should properly reported...

Thanks,
Trent

--
Trent Mick
trentm@activestate.com




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Linux-ia64] bug in fmod on trillian [fmod(-10,1) causes core dump]
  2000-05-01 18:43 [Linux-ia64] bug in fmod on trillian [fmod(-10,1) causes core dump] Trent Mick
@ 2000-05-01 19:35 ` Jim Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Wilson @ 2000-05-01 19:35 UTC (permalink / raw)
  To: linux-ia64

I tried your testcase on my system.  It worked fine.

Your bug report is incomplete.  You didn't mention what compiler version
you have, or the glibc version, or the kernel version, or the root filesystem
and/or OS release, or the firmware version or the hardware version.  The
problem could be any of those, or something else.

It is pretty unlikely that the compiler miscompiled such a simple testcase.
So I would guess, in order
1) You have a miscompiled glibc.  Try recompiling it or getting a newer one.
2) You have an old buggy gcc.  Try getting a newer one.  Repeat step one.
3) You have old buggy firmware.  Try updating it.

Jim



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-05-01 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-05-01 18:43 [Linux-ia64] bug in fmod on trillian [fmod(-10,1) causes core dump] Trent Mick
2000-05-01 19:35 ` Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox