From: DJ Delorie <dj@redhat.com>
To: "Carlos O'Donell" <codonell@redhat.com>
Cc: siddhesh@gotplt.org, libc-alpha@sourceware.org
Subject: Re: RFC: tunables failure indications...
Date: Fri, 13 Dec 2019 20:36:00 -0000 [thread overview]
Message-ID: <xnlfrgq8n3.fsf@greed.delorie.com> (raw)
In-Reply-To: <046165eb-8b96-047d-1c1e-e43e135442de@redhat.com> (codonell@redhat.com)
"Carlos O'Donell" <codonell@redhat.com> writes:
> Almost. _dl_fatal_printf is noreturn and calls _exit (127).
Done.
From b50d6a577bf2f118923ce0e1b159c4d659815405 Mon Sep 17 00:00:00 2001
From: DJ Delorie <dj@redhat.com>
Date: Fri, 13 Dec 2019 13:36:58 -0500
Subject: tunables: report sbrk() failure
diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c
index e625ac1a7d..f0d7d42770 100644
--- a/elf/dl-tunables.c
+++ b/elf/dl-tunables.c
@@ -45,12 +45,11 @@ 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;
+ _dl_fatal_printf ("sbrk() failure while processing tunables\n");
i--;
next prev parent reply other threads:[~2019-12-13 20:36 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
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 [this message]
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=xnlfrgq8n3.fsf@greed.delorie.com \
--to=dj@redhat.com \
--cc=codonell@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=siddhesh@gotplt.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).