Bug in mpz_mul with --disable-fft option... ?

Yves Gallot galloty at orange.fr
Wed Jun 17 00:44:00 CEST 2009


I compiled gmp 4.3.1 with mingw and I'm using it as a Windows dll in VS 2008
and it works perfectly with different codes.

To reduce memory allocated during mpz_mul operation on some huge numbers,
I compiled gmp 4.3.1 with the --disable-fft option.

The simple test program :

gmp_randstate_t randState;
mpz_t x, y; mpz_init(x); mpz_init(y);
mpz_urandomb(x, randState, 8*REFSIZE); mpz_urandomb(y, randState, 8*REFSIZE);
mpz_mul(x, x, y);

crashes in mpz_mul function if REFSIZE is equal or larger than 256*1024, doesn't crash
with REFSIZE = 128*1024 or less.
The problem doesn't occur when gmp 4.3.1 is not compiled with --disable-fft option.

I compiled gmp 4.3.1 under mingw32 with :
gcc version 4.3.0 20080305 (alpha-testing) mingw-20080502 (GCC)
flags are :
-m32 -O2 -pedantic -fomit-frame-pointer -mtune=core2 -march=core2 -mno-cygwin

I see no reason for the bug to be related to the compiler or its options because
no error was found with my programs and gmp 4.3.1 without --disable-fft option.
I have no other 32-bit system to test the 32-bit version of gmp 4.3.1 with --disable-fft option on 



More information about the gmp-bugs mailing list