Likely GMP bug

Marco Bodrato bodrato at mail.dm.unipi.it
Mon May 28 05:03:00 UTC 2018


Ciao,

Il Sab, 26 Maggio 2018 11:01 pm, Niels Möller ha scritto:
> Is it possible to construct some examples with v a multiple of 641, and
> input U such that ulimb = 2^31 after reduction?

It was hard, but we got it:
https://gmplib.org/repo/gmp/rev/1f8a8fefb5c2

The bug is triggered not only for 32-bit limbs, but also for other sizes.
On any machine, if the undefined behaviour is not the one we hope,

./configure --disable-assembly && make
make check TESTS= && tests/mpz/t-gcd_ui

should fail.
It does, with ABI=64 on shell.

Of course I also healed the bug, to avoid too many red lines in the next
"GMP testing status": https://gmplib.org/repo/gmp/rev/e4849ae7c974 .
This is just a workaround, waiting for a code reorganisation by someone
who knows better than me the various algorithm alternatives.

Ĝis,
m

-- 
http://bodrato.it/papers/



More information about the gmp-bugs mailing list