From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6005 invoked by alias); 6 Oct 2011 09:31:24 -0000 Received: (qmail 5994 invoked by uid 22791); 6 Oct 2011 09:31:23 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Oct 2011 09:31:07 +0000 From: "jim at meyering dot net" To: glibc-bugs@sources.redhat.com Subject: [Bug libc/13246] RFE: strtold: do not include uninitialized bytes when converting "NaN" Date: Thu, 06 Oct 2011 09:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jim at meyering dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: drepper.fsp at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00017.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=13246 --- Comment #7 from jim at meyering dot net 2011-10-06 09:30:49 UTC --- Thanks for the suggestion. The fix I applied to sort.c was to use a bare memset, since that happened to solve the problem at least with gcc-4.7.x. Your approach is better if an optimizer makes the false assumption that the bytes returned by strtold are always defined, in which case it might eliminate my seemingly redundant memset, and we'd have to report the optimizer bug. However, do you really think strtold should continue to return undefined bytes? That implies that any application that must sort (stably) user-supplied floating point numbers including NaNs must jump through these hoops. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.