public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/fw/builtin-syscalls-4] tunables: report sbrk() failure Date: Tue, 31 Dec 2019 10:46:00 -0000 [thread overview] Message-ID: <20191231104602.62976.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a059f9505bbef1f22c6f52798a74184632929145 commit a059f9505bbef1f22c6f52798a74184632929145 Author: DJ Delorie <dj@redhat.com> Date: Fri Dec 13 13:36:58 2019 -0500 tunables: report sbrk() failure Reviewed-by: Carlos O'Donell <carlos@redhat.com> Diff: --- elf/dl-tunables.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c index e625ac1..f0d7d42 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--;
reply other threads:[~2019-12-31 10:46 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20191231104602.62976.qmail@sourceware.org \ --to=fw@sourceware.org \ --cc=glibc-cvs@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: linkBe 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).