Potential bug in mpz_import on AIX 5.3

Mike Pastore mike at oobak.org
Thu Sep 13 04:03:28 CEST 2007


On Sep 12, 2007, at 7:04 PM, Torbjorn Granlund wrote:

> "Mike Pastore" <mike at oobak.org> writes:
>
>     int main(int argc, char *argv[]) {
>       unsigned long a[20];
>       mpz_t z;
>       mpz_import(z, 20, 1, sizeof(a[0]), 0, 0, a);
>       return(0);
>     }
>
>     GNU MP: Cannot reallocate memory (old_size=2058812348 new_size=80)
>     Resources lost
>
> You need to initiate z.

Then I think it would be prudent to include that in the mpz_import  
example in the manual, if only to prevent spurious bug reports from  
clueless users!

Thank you,

Mike


More information about the gmp-bugs mailing list