Build failure for 5.1.0-RC2 on Mac OS 10.8

Torbjorn Granlund tg at
Thu Dec 13 09:09:55 CET 2012

Jack Howarth <howarth at> writes:

  A current hg pull and update of gmp trunk produces 11 failures on
  x86_64-apple-darwin12 against Xcode 4.5.2...
  11 of 43 tests failed
  Please report to gmp-bugs at, see
  Same result for "./configure ABI=64;make;make check" using either llvm-gcc or clang.
Great.  ALl other systems report success, including those for a Mac.

Are hese shared builds or static builds?

I have no idea what Mac bug/quirk we may have struck this time, or what
arbitrary edits to make in order to work around it.

  Starting program: /Users/howarth/gmp/build/tests/mpn/.libs/t-toom3-sqr 
  Reading symbols for shared libraries ++............................. done
  Program received signal EXC_BAD_ACCESS, Could not access memory.
  Reason: KERN_INVALID_ADDRESS at address: 0x00000001050997f0
  0x00000001000692e4 in _gmpn_invert_limb_table ()
  (gdb) bt
  #0  0x00000001000692e4 in _gmpn_invert_limb_table ()
  #1  0x00007fff5fbfcf58 in ?? ()
This does not make sense, we are exeuting inside a table, and a table
that is unrelated to the present developments.

All your gdb backtraces seem to indicate that execution ended up in a
C-compiled table.

(Mac's venerable object file format puts const tables in the text
segment, meaning that they are sprinkled betwen instructions.  But how
the fft table could become executed for many test cases as a result of
my edits very far away from the fft code, is something to muse about.)

  I also tried relinking with -Wl,-no_pie just to make sure we weren't
  seeing some fail-out from ASLR. This had no effect on the segfaults.


I will have to make up my mind about what to do next.  I will probably
simply back out the last change, since I prefer code that happens to
work in many Apple tools releases, than code that follows Apple's
guidelines, but fails.  :-)

Unfortunately, the code is more kosher than the old code on ELF systems
too, and I'd like it to stay that way.


More information about the gmp-bugs mailing list