Bug#708264: gmp: mpn_sqrtrem is broken on ia64
Bill Allombert
ballombe at debian.org
Tue May 14 15:20:35 UTC 2013
Package: libgmp10
Version: 2:5.1.1+dfsg-3
Severity: important
Dear maintainers,
On ia64 it seems that mpn_sqrtrem fails to preserve the hardware registers,
leading to difficult to track down bugs.
Please see the attached file.
on merulo.debian.org running sid (gcc is 4.6.3-15)
This is the correct output:
[Sid] merulo - ~/src%gcc gmptest.c -g -O1 -lgmp -o test && ./test
8.53996 1.56883 8.15584 44.3965
10.1088 6.97113 52.5523 -36.2406
3.142 2.718 0.5772 14.13
8.53996 1.56883 8.15584 44.3965
33.3916
The broken output is:
[Sid] merulo - ~/src%gcc gmptest.c -g -O1 -lgmp -o test -DSQRTN && ./test
8.53996 1.56883 8.15584 44.3965
9.84742e-309 5.14474e-309 1.51044e+19 -36.2406
3.142 2.718 0.5772 14.13
8.53996 1.56883 8.15584 44.3965
33.3916
The values in the second line are random so it seems the call to mpn_sqrtrem
is clobbering the floating point registers. This can be checked by using
'info float' under gdb. We get the same results with gcc 4.7 and gcc 4.8
and higher optimization level. We get the correct result with -O0, though.
This bug seems to be causing pari to FTBFS on ia64.
Cheers,
--
Bill. <ballombe at debian.org>
Imagine a large red swirl here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmptest.c
Type: text/x-csrc
Size: 795 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20130514/af565733/attachment.c>
More information about the debian-science-maintainers
mailing list