mpz_mul core dump - attempt 2

Torbjorn Granlund tege at swox.com
Fri Sep 3 23:09:12 CEST 2004


Kate Minola <kminola at po0.glue.umd.edu> writes:

  The following C code seg faults on the 
  sparc-SunOS architecture (but not on
  other architectures that I have tried):
  
  --------------------------------------
  #include "gmp.h"
  int main()
  {
    gmp_randstate_t rstate;
    mpz_t a, b;
    mpz_init(a);
    mpz_init(b);
    gmp_randinit_default(rstate);
    mpz_urandomb(a, rstate, 1 << 26);
    mpz_mul(b, a, a);
  }
  --------------------------------------
    
This is almost certainly stack overflow.

<http://swox.com/gmp/manual/Debugging.html#Debugging>
<http://swox.com/gmp/manual/Build-Options.html>

-- 
Torbjörn


More information about the gmp-bugs mailing list