mpz_mul core dump

Torbjorn Granlund tege at swox.com
Tue Aug 31 23:07:15 CEST 2004


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

  The following C code core dumps on almost every
  architecture that I have tried.
  
  --------------------------------------
  #include "gmp.h"
  int main()
  {
    gmp_randstate_t rstate;
    mpz_t a, b;
    mpz_init(a);
    gmp_randinit_default(rstate);
    mpz_urandomb(a, rstate, 1 << 26);
    mpz_mul(b, a, a);
  }
  --------------------------------------
  
I suspect initializing b will help.  :-)

--
Torbjörn


More information about the gmp-bugs mailing list