gmp 4.3.0 tests fail on Mac OS X 10.5

Marcus Calhoun-Lopez marcuscalhounlopez at mac.com
Mon May 4 23:19:34 CEST 2009


This report relates to
http://gmplib.org/list-archives/gmp-bugs/2009-April/001371.html
but I hope to provide extra information.

All tests passed using GMP 4.2.4.

------------------------------------------------------------------------------------------------------------------------------------------------
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')
------------------------------------------------------------------------------------------------------------------------------------------------
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
------------------------------------------------------------------------------------------------------------------------------------------------
After both workarounds, all tests passed.

Configure Environment:
  MACOSX_DEPLOYMENT_TARGET='10.5'
  CPP='/usr/bin/cpp-4.0'
  CXX='/usr/bin/g++-4.0'
  ABI='32'
  CC='/usr/bin/gcc-4.0'

Configure Arguments:
  --enable-cxx

gcc -v:
  Using built-in specs.
  Target: i686-apple-darwin9
  Configured with: /var/tmp/gcc/gcc-5490~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
  Thread model: posix
  gcc version 4.0.1 (Apple Inc. build 5490)

uname -a:
  Darwin MacBookPro.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386

./config.guess:
  core2-apple-darwin9.6.0

./configfsf.guess:
  i386-apple-darwin9.6.0

Thank you,
Marcus


More information about the gmp-bugs mailing list