abort on error - is this being addressed?

Torbjorn Granlund tg at gmplib.org
Fri Aug 27 09:57:55 CEST 2010

Allan Chandler <allachan at au1.ibm.com> writes:

  If the mpz_mul in your below example cannot alloc memory, it should, in my
  far-from-humble opinion, clean up any memory it's allocated for the job,
  set the error flag then just return (NULL).  If the client sees fit to
  ignore that, tough luck.
"The error flag"?

And return (NULL) how and where?  You also wrote "I wasn't proposing to
change all the function prototypes to return errors".

I think I can sum up this discussion now:

Please change GMP so that handing of out-of-memry conditions magically
becomes nice and easy.



More information about the gmp-discuss mailing list