Test t-tdiv aborts (6.0.0a)

tg at gmplib.org tg at gmplib.org
Thu Mar 26 10:49:19 UTC 2015

"Ludwig, Mark" <ludwig.mark at siemens.com> writes:

  I am working to bootstrap GCC on Solaris, and having trouble with GMP 6.0.0a.
  The failure is in check-TESTS in directory mpz:
  bash: line 5: 17152 Segmentation Fault      (core dumped) ${dir}$tst
  FAIL: t-tdiv
  Traceback from dbx:
  > dbx t-tdiv core
  program terminated by signal SEGV (no mapping at the fault address) (fault address is just beyond end of stack)
  0x0001b620: __gmpn_mul+0x0228:  ld       [%l6], %i3
  (dbx) t                                                                      
  =>[1] __gmpn_mul(0xffbfad98, 0xffbfb308, 0x8e7, 0x0, 0xfffffa11, 0xffffe844), at 0x1b620 
    [2] __gmpn_dcpi1_divappr_q(0x1, 0xffbfe284, 0xffbfbee8, 0xffbfb308, 0xffbfb308, 0xffbfcc78), at 0x38dd4 
    [3] __gmpn_div_q(0xffffffff, 0x10ddc4, 0x0, 0xffbfb308, 0x1ff, 0xffffffff), at 0x209d0 
    [4] __gmpz_tdiv_q(0xffbfef44, 0xffbfef74, 0x10000, 0x9b35c, 0x83a14, 0x2f7), at 0x1841c 
    [5] main(0xffbfef68, 0xffbfef74, 0xffbfef50, 0xace4, 0xffbfef5c, 0xffbfef80), at 0x13260 
  Configured with:
  CC=cc CXX=CC ./configure --enable-cxx --build=sparc-sun-solaris2.10
  > cc -V
  cc: Sun C 5.12 SunOS_sparc 2011/11/16
  > uname -a
  SunOS myhost 5.10 Generic_Virtual sun4v sparc sun4v
  > ./config.guess
  > ./configfsf.guess
  Note that I am explicitly using the 32-bit form, because the GCC bootstrap
  recommendation is to use 32-bit.

Did you pass ABI=32 somehow, but forgot to show it above?  Using the
--build argument in the hope that it will restrict the ABI choices is
not supported.

I have no idea if that is related to the present problem.

  I sort of assume this is exposing a subtle compiler bug, but need help working
  around it or whatever.  Since all I want to do is bootstrap GCC with this (not
  use it for any general computations), I suppose it's possible I can ignore this
  particular failure, but I have no idea which parts of GMP get exercised in GCC
  under what conditions.  Once I get GCC bootstrapped, I intend to rebuild GMP
  using the bootstrapped GCC, because I have the impression that will generate a
  64-bit version of GCC, which is what I want, ultimately.
This is what I'll do:

1. Try to find an older gcc, use that.
2. Try "configure ABI=32 && make && make check" and see if that works
3. Pass explicit CFLAGS.  Start with the value GMP figures out (see
   perhaps 30 lines down the "configure" output) and change them to see
   if you can avoid the compiler bug.  Changing -O2 to -O1 might be an
   initial attempt.
4. Cross compile from a known-good compiler.

Please encrypt, key id 0xC8601622

More information about the gmp-bugs mailing list