This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Re: [PATCH] malloca v2


On Sun, Jan 13, 2013 at 12:34:23PM -0800, Paul Eggert wrote:
> Some comments:
> 
> On 01/13/2013 02:05 AM, OndÅej BÃlka wrote:
> 
> >    When memory cannot be allocated from heap
> >    malloca aborts.
> 
> Isn't it common for functions to want to fail (setting errno ==
> ENOMEM, say) when memory cannot be allocated?  These functions can't
> call malloca if it has the described behavior.  Shouldn't malloca, or
> a variant, support such functions?

Libc cannot EVER abort except in the few narrow cases where it's
specified to do so, or when the caller has invoked undefined behavior.
So this is just wrong.

Rich


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