This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/13246] RFE: strtold: do not include uninitialized bytes when converting "NaN"


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]