张金政
8月3日周六 上午10:58 (13小时前)
发送至 Torbjörn
Thanks for your reply. I'm using the latest GMP 6.1.2, and build it from
source.
Build command:
cc -g -Wl,-rpath,.libs -L.libs -lgmp bug.c -o gmp_bug.out
Ldd output:
linux-vdso.so.1 (0x7fff4c3d3000)
libgmp.so.10 => .libs/libgmp.so.10
Thanks for your reply. I'm using the latest GMP 6.1.2, and build it from
source.
Build command:
cc -g -Wl,-rpath,.libs -L.libs -lgmp bug.c -o gmp_bug.out
Ldd output:
linux-vdso.so.1 (0x7fff4c3d3000)
libgmp.so.10 => .libs/libgmp.so.10 (0x7f2bb536b000)
libc.so.6 =>
I cannot repro a segfault, but then I might not be using the same GMP
release as you. But your test case does indeed show a bug with floating
point input in bases which are a power of two and have many leading
zeros.
Here is a patch:
https://gmplib.org/repo/gmp/raw-rev/0fe70584021b
Please app
6154169852", 16);
mpf_out_str(NULL, 16, 1, f2); // XXX: coredump
__gmpf_div(f3, f1, f2);
mpf_out_str(NULL, 10, 1, f3);
mpf_clear(f1);
mpf_clear(f2);
mpf_clear(f3);
}
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.