libogc: malloc hangs instead of returning NULL on failure.

Post Reply
PeterM
Posts: 9
Joined: Fri Feb 08, 2008 9:34 pm
Location: Edinburgh, UK
Contact:

libogc: malloc hangs instead of returning NULL on failure.

Post by PeterM » Fri Feb 08, 2008 9:58 pm

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.

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

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

Post by WinterMute » Mon Feb 11, 2008 3:31 pm

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.
Help keep devkitPro toolchains free, Donate today

Personal Blog

PeterM
Posts: 9
Joined: Fri Feb 08, 2008 9:34 pm
Location: Edinburgh, UK
Contact:

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

Post by PeterM » Mon Feb 11, 2008 3:35 pm

Ah, thank you very much!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests