From ea6029b19c6004c69a9074bf399091bbfbf58a0c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 29 Mar 2014 17:22:14 +0000 Subject: Fix scalb spurious "invalid" exceptions (bug 16770). This patch fixes bug 16770, spurious "invalid" exceptions from scalb when testing whether the second argument is an integer, by inserting appropriate range checks to determine whether a cast to int is safe. (Note that invalid_fn is a function that handles both nonintegers and large integers, distinguishing them reliably using functions such as __rint; note also that there are no issues with scalb needing to avoid spurious "inexact" exceptions - it's an old-POSIX XSI function, not a standard C function bound to an IEEE 754 operation - although the return value is still fully determined.) Tested x86_64 and x86. [BZ #16770] * math/e_scalb.c (__ieee754_scalb): Check second argument is not too large before casting to int. * math/e_scalbf.c (__ieee754_scalbf): Likewise. * math/e_scalbl.c (__ieee754_scalbl): Likewise. * math/libm-test.inc (scalb_test_data): Add more tests. --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'NEWS') diff --git a/NEWS b/NEWS index b34c9fc65e..9597cbdb24 100644 --- a/NEWS +++ b/NEWS @@ -13,7 +13,7 @@ Version 2.20 16532, 16545, 16574, 16599, 16600, 16609, 16610, 16611, 16613, 16623, 16632, 16634, 16639, 16642, 16649, 16670, 16674, 16677, 16680, 16683, 16689, 16695, 16701, 16706, 16707, 16712, 16713, 16714, 16731, 16743, - 16758, 16759, 16760. + 16758, 16759, 16760, 16770. * Running the testsuite no longer terminates as soon as a test fails. Instead, a file tests.sum (xtests.sum from "make xcheck") is generated, -- cgit 1.4.1