From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23578 invoked by alias); 31 Dec 2016 15:55:48 -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 23536 invoked by uid 89); 31 Dec 2016 15:55:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=ack, H*R:D*sourceware.org X-HELO: homiemail-a119.g.dreamhost.com Subject: Re: [PATCH 2/4] Initialize tunable list with the GLIBC_TUNABLES environment variable Reply-To: siddhesh@sourceware.org References: <1483198831-2232-1-git-send-email-siddhesh@sourceware.org> <1483198831-2232-3-git-send-email-siddhesh@sourceware.org> <879f8c1e-34cf-ec78-0d6d-ba2e434c3823@redhat.com> <9dcd5a97-5a33-368f-7e9a-aa64ea75c146@sourceware.org> To: Florian Weimer , libc-alpha@sourceware.org Cc: carlos@redhat.com From: Siddhesh Poyarekar Message-ID: Date: Sat, 31 Dec 2016 15:55:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <9dcd5a97-5a33-368f-7e9a-aa64ea75c146@sourceware.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-12/txt/msg01096.txt.bz2 On Saturday 31 December 2016 09:20 PM, Siddhesh Poyarekar wrote: > On Saturday 31 December 2016 09:15 PM, Florian Weimer wrote: >> This still has an implicit comparision against '\0', which is against >> the style guide. > > Ack, I'll fix it up. > >>> + /* FIXME: In reality this will not return NULL, it 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. */ >>> + if (out == (void *)-1) >>> + return NULL; >> >> Comment does not match: NULL is not (void *) -1. I changed it to: 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.