From: Siddhesh Poyarekar <siddhesh@gotplt.org>
To: DJ Delorie <dj@redhat.com>
Cc: codonell@redhat.com, libc-alpha@sourceware.org
Subject: Re: RFC: tunables failure indications...
Date: Thu, 12 Dec 2019 03:50:00 -0000 [thread overview]
Message-ID: <5553b162-af7c-9881-8373-c1bb277ab930@gotplt.org> (raw)
In-Reply-To: <xnh826sesv.fsf@greed.delorie.com>
On 12/12/19 3:30 am, DJ Delorie wrote:
> diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c
> index e625ac1a7d..b55d677aee 100644
> --- a/elf/dl-tunables.c
> +++ b/elf/dl-tunables.c
> @@ -45,12 +45,15 @@ tunables_strdup (const char *in)
> while (in[i++] != '\0');
> char *out = __sbrk (i);
>
> - /* FIXME: In reality if the allocation fails, __sbrk will crash attempting to
> - set the thread-local errno since the TCB has not yet been set up. This
> - needs to be fixed with an __sbrk implementation that does not set
> - errno. */
> + /* For most of the tunables code, we ignore user errors. However,
> + this is a system error - and running out of memory at program
> + startup should be reported, so we do. */
> if (out == (void *)-1)
> - return NULL;
> + {
> +#define SBRKMSG "sbrk() failure while processing tunables"
> + write (2, SBRKMSG, sizeof(SBRKMSG) - 1);
> + _exit (1);
I think this could be a _dl_fatal_printf() or similar.
Siddhesh
next prev parent reply other threads:[~2019-12-12 3:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-05 22:44 DJ Delorie
2019-12-06 8:33 ` Siddhesh Poyarekar
2019-12-10 16:26 ` Carlos O'Donell
2019-12-10 16:36 ` Siddhesh Poyarekar
2019-12-11 22:01 ` DJ Delorie
2019-12-12 3:50 ` Siddhesh Poyarekar [this message]
2019-12-12 4:03 ` DJ Delorie
2019-12-12 4:08 ` Siddhesh Poyarekar
2019-12-12 17:51 ` Carlos O'Donell
2019-12-13 18:48 ` DJ Delorie
2019-12-13 20:14 ` Carlos O'Donell
2019-12-13 20:36 ` DJ Delorie
2019-12-13 20:41 ` Carlos O'Donell
2019-12-16 22:16 ` DJ Delorie
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=5553b162-af7c-9881-8373-c1bb277ab930@gotplt.org \
--to=siddhesh@gotplt.org \
--cc=codonell@redhat.com \
--cc=dj@redhat.com \
--cc=libc-alpha@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).