Bug 10817 - coshl overflows prematurely
Summary: coshl overflows prematurely
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: math (show other bugs)
Version: 2.9
: P2 normal
Target Milestone: ---
Assignee: Andreas Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-20 16:34 UTC by Ray Chason
Modified: 2014-07-01 05:37 UTC (History)
1 user (show)

See Also:
Host: x86_64-unknown-linux
Target: x86_64-unknown-linux
Build: x86_64-unknown-linux
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ray Chason 2009-10-20 16:34:56 UTC
The coshl function indicates an overflow when its result is not representable as
double, even when the result is representable as long double.  An example is
"coshl(1000.L);".

sinhl does not have this bug.

The bug appears to be that the version of coshl in math/w_coshl.c uses __finite
to check the result of __ieee754_coshl.  It should use __finitel, as sinhl in
math/w_sinhl.c does.  This bug should be present on any system that uses
math/w_coshl.c as its coshl and defines long double as having a greater exponent
range than double.

I found the bug in a version of 2.7 that shipped with Fedora 8; but the bug is
present in the 2.10.1 source as well.
Comment 1 Ulrich Drepper 2009-10-27 20:48:23 UTC
Fixed in git.