Bug in Test Routines

Brian Gladman brg at gladman.plus.com
Fri May 5 00:42:20 CEST 2006


I think there is a bug in the test file refmpn.c, in subroutine
sb_divrem_mn (at line 1674):

 ASSERT (refmpn_add_n(np+i, np+i, dp, dsize) != 0);

If assertions are turned off, this line will be empty and the necessary
addition will then be absent.

 n0 = refmpn_add_n(np+i, np+i, dp, dsize);
 ASSERT (n0 != 0);

is needed instead.

   Brian Gladman



More information about the gmp-bugs mailing list