1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Avoid overflows from long double functions using __kernel_standard.

This commit is contained in:
Joseph Myers
2012-03-28 09:32:12 +00:00
parent bdc6f13012
commit 41bf21a1e7
30 changed files with 197 additions and 66 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2011 Free Software Foundation, Inc.
/* Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
@ -30,12 +30,12 @@ sysv_scalbl (long double x, long double fn)
if (__builtin_expect (__isinfl (z), 0))
{
if (__finitel (x))
return __kernel_standard (x, fn, 232); /* scalb overflow */
return __kernel_standard_l (x, fn, 232); /* scalb overflow */
else
__set_errno (ERANGE);
}
else if (__builtin_expect (z == 0.0L, 0) && z != x)
return __kernel_standard (x, fn, 233); /* scalb underflow */
return __kernel_standard_l (x, fn, 233); /* scalb underflow */
return z;
}