From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24560 invoked by alias); 23 Apr 2016 12:24:15 -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 24369 invoked by uid 89); 23 Apr 2016 12:24:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: albireo.enyo.de From: Florian Weimer To: Mike Frysinger Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] tst-fmon/tst-numeric: switch malloc to static stack space [BZ #19671] References: <1461359558-26367-1-git-send-email-vapier@gentoo.org> Date: Sat, 23 Apr 2016 12:24:00 -0000 In-Reply-To: <1461359558-26367-1-git-send-email-vapier@gentoo.org> (Mike Frysinger's message of "Fri, 22 Apr 2016 17:12:38 -0400") Message-ID: <87inz8jyxt.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2016-04/txt/msg00584.txt.bz2 * Mike Frysinger: > The current test code doesn't check the return value of malloc. > This should rarely (if ever) cause a problem, but rather than add > some return value checks, just statically allocate the buffer on > the stack. This will never fail (or if it does, we've got much > bigger problems that don't matter to the test). This needs a ChangeLog entry. > - char *s = malloc (201); > + char s[201]; Please use a enum constant of 200, and also pass it to strfmon. K think the current 200/201 choice is technically incorrect (the maximum includes the terminating null byte).