List Info

Thread: Bug in Test Routines




Bug in Test Routines
user name
2006-05-04 22:42:20
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

_______________________________________________
gmp-bugs mailing list
gmp-bugsswox.com
http://swox
.com/mailman/listinfo/gmp-bugs
Bug in Test Routines
user name
2006-06-13 18:40:04
Brian Gladman <brggladman.plus.com> writes:

  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.
  
Thanks for spotting this.

The reason this hasn't been  triggered is that the
likelyhood
of the problematic outcome is extremely slim.

I replaced the ASSERT by ASSERT_CARRY.

-- 
Torbjörn
_______________________________________________
gmp-bugs mailing list
gmp-bugsswox.com
http://swox
.com/mailman/listinfo/gmp-bugs
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )