Patch: support callback on allocation overflow instead of calling abort()

Vincent Lefevre vincent at
Tue Oct 6 09:45:58 UTC 2020

On 2020-10-06 04:41:42 +0100, Colin Caine wrote:
> This is used by Julia to raise an OutOfMemory exception rather than having
> the Julia process itself abort.
> Others on stackoverflow, etc, have experienced similar problems with
> undesired aborts(), so this patch would probably be useful to a variety of
> users. (see:
> More information is available here and in the linked issues and PRs:

Since the function could have allocated memory for intermediate
computations, how do you avoid memory leaks?

Vincent Lefèvre <vincent at> - Web: <>
100% accessible validated (X)HTML - Blog: <>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

More information about the gmp-bugs mailing list