mpz_mul core dump

Kate Minola kminola at po1.glue.umd.edu
Tue Aug 31 22:12:54 CEST 2004


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 am using gmp-3.4.1 configured with --disable-shared and
built with gcc-3.4.1.

Here are details from one architecture to make this a
complete bug report:

% gcc -v
Reading specs from /usr/local/gcc-3.4.1/x86-Linux/lib/gcc/i686-pc-linux-gnu/3.4.1/specs
Configured with: ../gcc-3.4.1/configure --enable-languages=c --prefix=/usr/local/gcc-3.4.1/x86-Linux
Thread model: posix
gcc version 3.4.1
% uname -a
Linux  2.4.20-6 #1 Thu Feb 27 10:06:59 EST 2003 i686 i686 i386 GNU/Linux
% ./config.guess
pentium4-pc-linux-gnu
% ./configfsf.guess
i686-pc-linux-gnu
%

Kate Minola
University of Maryland, College Park


More information about the gmp-bugs mailing list