mini-gmp test suite could be improved

Torbjörn Granlund tg at gmplib.org
Wed Sep 5 14:00:18 UTC 2018


paul zimmermann <Paul.Zimmermann at inria.fr> writes:

  void
  mpz_add_ui (mpz_t r, const mpz_t a, unsigned long b)
  {
    b = b % 0xffffffff;
    if (a->_mp_size >= 0)
      r->_mp_size = mpz_abs_add_ui (r, a, b);
    else
      r->_mp_size = -mpz_abs_sub_ui (r, a, b);
  }

An interestng approach, patch the library to miscompute things in a way
that the testsuite does not detect!  Perhaps this can be automated and
given a new, trendy name now that fuzzing has been on everybody's mind
for so long?  :-)

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list