张金政
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
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