[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [xml] Regarding Malloc Failure Handling



Hi,

Ashwin wrote:
> Recently we performed failure testing on libxml, that is we simulated malloc
> failures to see how libxml behaved in that scenario. As a result of the
> testing we found a number of memory leaks and some crashes.
> 
>           There are other similar problems, so I was wondering if there is
> an assumption that malloc failure will not occur since it is a rare
> occurrence. Or does corrective action need to be taken wherever it occurs in
> the failure path. 

In almost all of the code, malloc failures are handled correctly as errors, so
if you find places where that's not the case, that should be considered a bug
IMHO.

Stefan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]