From: Josef Wolf <jw@raven.inka.de>
To: newlib@sourceware.org
Subject: Re: undefined references since newlib-3.2.0
Date: Sat, 13 Jun 2020 10:27:09 +0200 [thread overview]
Message-ID: <20200613082709.GF15174@raven.inka.de> (raw)
In-Reply-To: <87v9jvhltw.fsf@keithp.com>
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
next prev parent reply other threads:[~2020-06-13 8:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 8:00 Wolf, Josef
2020-06-12 8:21 ` Josef Wolf
2020-06-12 22:50 ` Josef Wolf
2020-06-13 0:05 ` Keith Packard
2020-06-13 8:27 ` Josef Wolf [this message]
2020-06-13 17:20 ` Keith Packard
2020-06-14 14:50 ` Josef Wolf
2020-06-14 17:02 ` Keith Packard
2020-06-14 17:40 ` Brian Inglis
2020-06-14 20:13 ` Keith Packard
2020-06-15 4:53 ` Dimitrios Glynos
2020-06-16 3:43 ` Keith Packard
2020-06-17 11:36 ` Josef Wolf
2020-06-13 10:31 ` Jeffrey Walton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200613082709.GF15174@raven.inka.de \
--to=jw@raven.inka.de \
--cc=newlib@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).