From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32517 invoked by alias); 9 Aug 2012 10:00:36 -0000 Received: (qmail 32484 invoked by uid 22791); 9 Aug 2012 10:00:35 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Aug 2012 10:00:19 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 06B13151A00C for ; Thu, 9 Aug 2012 11:00:18 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id otTNWfwiXhEi; Thu, 9 Aug 2012 11:00:17 +0100 (BST) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001490] C99 snprintf() does not include terminated null in truncated strings X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: bernd.edlinger@hotmail.de X-Bugzilla-Status: NEW X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 09 Aug 2012 10:00:00 -0000 Message-Id: <20120809100017.01D2D151A010@mail.ecoscentric.com> Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2012-08/txt/msg00025.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001490 --- Comment #8 from Bernd Edlinger 2012-08-09 11:00:15 BST --- (In reply to comment #7) Sergei, > > This function needs 816 bytes on the stack, > > even if you do not use any %f formats! > > > > Maybe reducing this number could be worth the effort. > Even if CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT is not defined? hmm, thats funny..... Without that define it is only 152 bytes. That is 664 bytes difference. BUT #define BUF changes only from 40 to 326. Incredible, but I think I can reduce this easily: cvt(), round(), and exponent() are all inlined. However, char expbuf[MAXEXP] is 308 bytes!!! but the largest possible exponent, "308", needs 3 only bytes. Good you asked about that. Thanks! This will reduce the stack use by 305 bytes. > Bernd, could you, please, prepare the patch on 0-padding with ChangeLog > entry? It seems to me the patch can be submitted for bug #20804 > record. > Thank you, > Sergei Ok, I am going to fix that stack issue too, and if you do not mind, I'd also like to fix the %g issue [Bug #1001628] and submit a cumulative patch at [Bug #20804]. Thanks, Bernd. -- Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.