Page 1 of 1

libogc: malloc hangs instead of returning NULL on failure.

Posted: Fri Feb 08, 2008 9:58 pm
by PeterM
It seems that malloc locks up instead of returning NULL when it can't allocate a block big enough.

I don't *think* it's my bug (I've increased the stack size in ogc.ld from 128K to 256K), but it could be.

Re: libogc: malloc hangs instead of returning NULL on failure.

Posted: Mon Feb 11, 2008 3:31 pm
by WinterMute
Definitely not your bug. I found some old default newlib code in the malloc support functions - not really sure why the default behaviour is to abort on failure tbh. Fixed in CVS, hopefully won't be too much longer before we get the next toolchain iteration out there.

Re: libogc: malloc hangs instead of returning NULL on failure.

Posted: Mon Feb 11, 2008 3:35 pm
by PeterM
Ah, thank you very much!