undefined references since newlib-3.2.0

Josef Wolf jw@raven.inka.de
Sat Jun 13 08:27:09 GMT 2020


Thanks for your reply, Keith!

On Fri, Jun 12, 2020 at 05:05:15PM -0700, Keith Packard wrote:
> Josef Wolf <jw@raven.inka.de> writes:
> 
> > This patch replaces Balloc() by eBalloc() which calls __assert_func() on
> > failure which in turn calls exit() and/or abort()
> 
> As an interim step, having a fix available sooner was a good thing.

I see. But at a first glance, returning NULL seems to be not much more work.

> > Shouldn't those library functions simply report the error by returning NULL to
> > the caller and let the application handle the situation?
> 
> It's complicated by the libc API which doesn't have defined error return
> values for all of the affected APIs.

I don't really understand this. The classical way to return error from
functions returning a pointer is to return NULL. One has to make sure not to
leak, of course. Which return values would be needed beyond NULL?

-- 
Josef Wolf
jw@raven.inka.de


More information about the Newlib mailing list