bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GMP bug - mpf_get_str for very small numbers [SORRY^2]


From: Rezac David
Subject: GMP bug - mpf_get_str for very small numbers [SORRY^2]
Date: Wed, 16 May 2001 08:48:05 +0200 (CEST)

Hello again.

I'm very sorry that I have somehow skipped the 'Reporting Bugs' section in
the manual... Sorry, sorry. Well, I hope this time it's going to be ok
(finally)...

I'm sending a small demo program that shows the error, too. To make it,
you can do
     g++ demo.cc -o demo ../libgmp.a
[replace the libgmp.a's directory with yours].

================================================================================
Here comes the required bug-stuff:


1. GMP version 3.1.1

2. test program is attached

3. when trying to print a very small number [mpf_t], the GMP
   crashes at assert in get_str.c on line 374

4. crash report [gdb]

---8<-------------------------

(gdb) run
Starting program: /home/dave/tmp/mail/gmp/demo

This works.  a = 0.1e-2147483639
get_str.c:374: GNU MP assertion failed: tstr[0] != 0
This doesn't. b =
Program received signal SIGABRT, Aborted.
0x400b34e1 in __kill () from /lib/libc.so.6
(gdb) where
#0  0x400b34e1 in __kill () from /lib/libc.so.6
#1  0x400b32ba in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2  0x400b4a82 in abort () at ../sysdeps/generic/abort.c:88
#3  0x804d0a4 in __gmp_assert_fail () at assert.c:48
#4  0x8048f3e in __gmpf_out_str (stream=0x400520a0, base=10, n_digits=10,
op=0xbffff948) at out_str.c:58
#5  0x8048892 in main ()
#6  0x400a2b65 in __libc_start_main (main=0x80487dc <main>, argc=1,
ubp_av=0xbffff9dc, init=0x80485d8 <_init>,
    fini=0x804e04c <_fini>, rtld_fini=0x4000df24 <_dl_fini>,
stack_end=0xbffff9d4) at ../sysdeps/generic/libc-start.c:111

---8<--------------------------

5. okay, no dumps, executables nor straces included :)

6. no option. just started ./configure

7. gcc version
     Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
     gcc version 2.96 20000731 (Red Hat Linux 7.0)

8. uname -a
    Linux davecomp 2.4.2 #2 Ct bre 8 21:34:56 CET 2001 i686 unknown

9. output from ./config.guess
    pentium2-pc-linux-gnu



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

Well thats all.
Thank you for your patience!


With regards,
David Rezac





reply via email to

[Prev in Thread] Current Thread [Next in Thread]