mpz_gcdext bug in mini-gmp

Torbjörn Granlund tg at gmplib.org
Sun Mar 22 11:21:28 UTC 2020


Syed Jafri <syedjafri97 at gmail.com> writes:

  Thank you for the wonderful library, I have been using mini-gmp and I
  have run into a bug with the mpz_gcdext function. The full GMP version
  gives the correct output, while the mini-gmp version of the function
  fails at line 2911 of mini-gmp.c, at the code ```assert (mpz_even_p
  (t0) && mpz_even_p (s0));```

  I have created a full reproduction with both mini-gmp and gmp, using
  the mpz_gcdext function and sample inputs at [link to external site].

Please provide all reproduction information in a follow-up email.

  I am currently using unmodified GMP and mini-GMP version 6.2.0, with
  Apple clang version 11.0. Please let me know if you need any
  additional information, I will provide it to you promptly. Looking
  forward to solving this bug as quickly as possible.

Apple clang is notorious for miscompiling things.  Please ensure you're
at the latest version of "Xcode" and by all means avoid upgrading to any
new major Xcode release.  (The latest major release which arrived with
Catalina was no exception; it miscompiled about everything, including
GMP.)

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


More information about the gmp-bugs mailing list