paul zimmermann <paul.zimmerm...@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
_______________________________________________
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel

Reply via email to