Arithmetic bug on ARM (STM 32 F4)

Torbjörn Granlund tg at
Thu Jan 21 20:17:21 UTC 2021

  ttt =

  but ttt should be

  I give the code to reproduce the bug in attachment.

  GMP is built with the options:
  ../configure CFLAGS="-nostartfiles --specs=nosys.specs -mcpu=cortex-m4"
  --host=arm-none-eabi --disable-assembly --prefix=YOUR_CHOICE

As you might guess, GMP's mod operation has been tested a lot during
GMP's 30 years of existence.  A completely fundamental bug like the one
you observe is of course still possible, but incredibly unlikely.

It is much more likely that the compiler you used for compiling GMP is
buggy.  That's indeed where you should start looking.

Unfortunatly, we cannot help.  We don't know what compiler you used, and
even if we did, we don't have access to it.

Please encrypt, key id 0xC8601622

More information about the gmp-bugs mailing list