mpz_out_str seg fault with large number = bug?

viny@adinet.com.uy viny at adinet.com.uy
Thu Aug 4 00:44:30 CEST 2005


While I was checking the performance of the mpz_fac_ui in gmp 4.1.4 in a
redhat, I become aware that mpz_out_str aborts with segmentation fault for
large numbers.

like this:

...
mpz_init(c);
mpz_fac_ui(c,1000000L);
mpz_out_str(stdout,10,c);  //ok without this, but seg fault if included
mpz_clear(c);
...



I also noticed that mpz_fac_ui also seg faults if the parameter is as big
as 10000000L


Is there any documentation about the admisible range of those functions?


Thanks
  Vincent




More information about the gmp-discuss mailing list