[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GMP does not check for memory allocation failures
From: |
Matt Carter |
Subject: |
GMP does not check for memory allocation failures |
Date: |
Mon, 11 Feb 2002 13:57:56 -0500 |
I noticed that GMP doesn't check for failed memory allocations.
This causes my application to crash when the system is low on memory.
GMP version: 4.0.1
I have noticed the problem in mpf/set*.c and mpf/iset*.c, but I suspect the
problem is elsewhere, too.
I have solved the problem in mpf by adding return codes to __gmpf_set*(),
and checking the return values of allocation calls for NULL. I can provide
you my code if you wish.
Sincerely,
Matt Carter
- GMP does not check for memory allocation failures,
Matt Carter <=