This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PowerPC: Fix for strtold overflow handling (bz14551)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Tue, 11 Sep 2012 17:02:42 +0000
- Subject: Re: [PATCH] PowerPC: Fix for strtold overflow handling (bz14551)
- References: <504F6941.5030109@linux.vnet.ibm.com>
On Tue, 11 Sep 2012, Adhemerval Zanella wrote:
> I messed up the threads in my last email and the message ended up being
> too confusing. This patch is intended to fix the bz14551
> http://sourceware.org/bugzilla/show_bug.cgi?id=14551 and it fixes
> the errors that 'tst-strtod-overflow' triggers with IBM long double.
Sorry, you still haven't explained how a long double change could possibly
be relevant to tst-strtod-overflow, which doesn't use strtold at all.
> - if (exponent2 > 0)
> + if (exponent2 > 0 && u.ieee.exponent < 0x7FF)
> u.ieee.exponent2 = exponent2;
> else
> lo >>= 1 - exponent2;
I don't think this can be correct; this may avoid setting the exponent of
the low part, but it could still have an incorrect nonzero mantissa in
these overflow cases.
You also need to add a testcase to the testsuite covering the various
overflow possibilities, and the overflow case should set errno to ERANGE
(and that should be tested).
--
Joseph S. Myers
joseph@codesourcery.com