This is the mail archive of the libc-alpha@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]

Re: [PATCH] PowerPC: Fix for strtold overflow handling (bz14551)


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


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