gmp 4.3.0 tests fail on Mac OS X 10.5

Torbjorn Granlund tg at gmplib.org
Tue May 5 09:08:03 CEST 2009


Marcus Calhoun-Lopez <marcuscalhounlopez at mac.com> writes:

  When using 4.3.0, the first test to fail is
    make  check-TESTS
    /bin/sh: line 1: 41402 Bus error               ${dir}$tst
    FAIL: t-asmtype
  
  Running t-asmtype with gdb:
    (gdb) run
    Starting program: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gmp/work/gmp-4.3.0/tests/mpn/.libs/t-asmtype
    Reading symbols for shared libraries +++. done
  
    Program received signal EXC_BAD_ACCESS, Could not access memory.
    Reason: KERN_PROTECTION_FAILURE at address: 0x00008e64
    0x00068a06 in .Loop ()
    (gdb) where
    #0  0x00068a06 in .Loop ()
    #1  0x00008e58 in y.5942 ()
  
  A workaround is to revert mpn/x86/p6/aors_n.asm to its 4.2.4 version:
    include_mpn(`x86/k7/aors_n.asm')

Interesting.  Why would Apple have problems with that file?  Anybody has
a guess?

On a failing system, please go into tests/devel and do the following:

  make try
  ./try mpn_add_n

Presumably this fails too.  What does the failure look like?

  Using the above workaround, there were still two test errors
    mpz_hamdist wrong on 2 bits pos/pos
      i    0
      j    32
      got  253
      want 2
      x   =0x1
      y   =0x100000000
    /bin/sh: line 1:  1234 Abort trap              ${dir}$tst
    FAIL: t-hamdist
    PASS: t-oddeven
    mpz_popcount wrong on single bit at 0
       got 64, want 1
  
  A workaround was to revert mpn/x86/p6/sse2/popcount.asm to its 4.2.4 version (which is nonexistence):
    rm mpn/x86/p6/sse2/popcount.asm

I'll start with the aors_n.asm problem, I suspect the rot cause is the
same for both problems.

  After both workarounds, all tests passed.
  
  ./config.guess:
    core2-apple-darwin9.6.0
  
  ./configfsf.guess:
    i386-apple-darwin9.6.0
  
Thanks for isolating this to two files!  Now we might be able to find an
Apple workarund for GMP 4.3.1.

-- 
Torbjörn


More information about the gmp-bugs mailing list