This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/13246] RFE: strtold: do not include uninitialized bytes when converting "NaN"
- From: "jim at meyering dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Thu, 06 Oct 2011 09:30:49 +0000
- Subject: [Bug libc/13246] RFE: strtold: do not include uninitialized bytes when converting "NaN"
- Auto-submitted: auto-generated
- References: <bug-13246-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13246
--- Comment #7 from jim at meyering dot net <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.