From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96716 invoked by alias); 13 Dec 2019 20:14:33 -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 96698 invoked by uid 89); 13 Dec 2019 20:14:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.9 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=HX-Languages-Length:1243 X-HELO: us-smtp-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576268070; 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=GiUMlH9AFSWFhpjpaMwup45OjbyIVec8c+lfzdjFBCg=; b=EEcpDUBodtlQTsv9T00WelCTaVI2+Bo5cwXVZY17jBQEpe1I95td9nud2da+34HxVhW+AH TMi0ee3ReZXPnAYKHhOM40kV6e9Ab1cSowv9JtbcWuEw5RnInw599e72X/tS3r6crCePQX 4IvHrxjwdxSiNEKN8eANecgPHmU6NFs= 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: <046165eb-8b96-047d-1c1e-e43e135442de@redhat.com> Date: Fri, 13 Dec 2019 20:14: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/msg00502.txt.bz2 On 12/13/19 1:48 PM, DJ Delorie wrote: > > ? > Almost. _dl_fatal_printf is noreturn and calls _exit (127). So all you need is the call to _dl_fatal_printf. > From d64d1ddf3d79a1e51612f8e4ae3ecfd020246275 Mon Sep 17 00:00:00 2001 > From: DJ Delorie > 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..3a3f8096c2 100644 > --- a/elf/dl-tunables.c > +++ b/elf/dl-tunables.c > @@ -45,12 +45,14 @@ 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"); > + _exit (1); > + } > > i--; > > -- Cheers, Carlos.