From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18840 invoked by alias); 13 Dec 2019 20:41:10 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 18827 invoked by uid 89); 13 Dec 2019 20:41:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: us-smtp-delivery-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576269667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fvHDISGTpv75lVPL8ZYeosF3eClSRbkrXr31hDlisvk=; b=HZsgTsmkMwaSdlr9U14ZXlZ46LXwsBxWmCJRc9TJQIhl6tmeAkmBSXshuYdlSP/8gUz4mf vR9cR92KXqI1nfQFUSprKf5Dm2n4+8GAnpJv3LNyUAl3i9uf5FIfC9ZlhXdKgchhrhM0h+ l66AW21+/psJ9GUMiufUyqzCyEct2Lg= Return-Path: Subject: Re: RFC: tunables failure indications... To: DJ Delorie Cc: siddhesh@gotplt.org, libc-alpha@sourceware.org References: From: Carlos O'Donell Message-ID: <1fae026e-395f-5552-9f65-0629b3593d09@redhat.com> Date: Fri, 13 Dec 2019 20:41:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-12/txt/msg00506.txt.bz2 On 12/13/19 3:21 PM, DJ Delorie wrote: > "Carlos O'Donell" writes: >> Almost. _dl_fatal_printf is noreturn and calls _exit (127). > > Done. > > From b50d6a577bf2f118923ce0e1b159c4d659815405 Mon Sep 17 00:00:00 2001 > From: DJ Delorie > Date: Fri, 13 Dec 2019 13:36:58 -0500 > Subject: tunables: report sbrk() failure > LGTM for master if you proved this works by using gdb to set out to void and confirmed it exits with the right error code and exits via _exit (had a breakpoint on _exit and it triggers without showing exit on the call chain). Reviewed-by: Carlos O'Donell > 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--; > > -- Cheers, Carlos.