This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

out of memory in Balloc


When mprec.c, dtoa.c or strtod.c, ldtoa.c or gdtoa-gethex.c calls balloc, it does not check the return value.
Thus, when we run out of memory, and memory at 0 can be accessed, the program will run on for a while
and later fail with an obscure failure.
I'm not sure how to best handle this - should we call abort then, or would this cause to much other code to
be dragged in? If the latter is the case, then I think an infinite loops is still better than memory corruption.


Since none of the callers to Balloc in newlib checks the return value, I suppose an abort call, if any, should
be placed in Balloc instead of returning NULL there.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]