GNU C Library master sources branch master updated. glibc-2.22-491-gaf1b2fd

jsm28@sourceware.org jsm28@sourceware.org
Thu Oct 29 23:10:00 GMT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  af1b2fd08388a3beec3ee7eaa30646d9c002824e (commit)
      from  68b7f7df0cc9f13a0f6c182208fe7e74c3387412 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=af1b2fd08388a3beec3ee7eaa30646d9c002824e

commit af1b2fd08388a3beec3ee7eaa30646d9c002824e
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Thu Oct 29 23:09:51 2015 +0000

    Fix ldbl-128 log1pl (-qNaN) spurious "invalid" exception (bug 19189).
    
    The ldbl-128 version of log1pl raises a spurious "invalid" exception
    for a -qNaN argument.  This patch fixes this by making the initial
    check for infinities and NaNs handle arguments of both signs in such a
    way that NaNs result in a NaN being returned (quietly if the input NaN
    was quiet) while +Inf results in +Inf being returned and -Inf results
    in a qNaN being returned with "invalid" exception raised.
    
    Tested for mips64.
    
    	[BZ #19189]
    	* sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl): Make check for
    	non-finite argument handle arguments with negative sign.

diff --git a/ChangeLog b/ChangeLog
index 42c1701..3d3440f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-10-29  Joseph Myers  <joseph@codesourcery.com>
 
+	[BZ #19189]
+	* sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl): Make check for
+	non-finite argument handle arguments with negative sign.
+
 	* math/libm-test.inc (j0_test_data): Do not test sign of zero
 	result from infinite argument.
 	(j1_test_data): Likewise.
diff --git a/NEWS b/NEWS
index ae89162..654217c 100644
--- a/NEWS
+++ b/NEWS
@@ -21,7 +21,7 @@ Version 2.23
   18966, 18967, 18969, 18970, 18977, 18980, 18981, 18982, 18985, 19003,
   19007, 19012, 19016, 19018, 19032, 19046, 19048, 19049, 19050, 19059,
   19071, 19074, 19076, 19077, 19078, 19079, 19085, 19086, 19088, 19094,
-  19095, 19124, 19125, 19129, 19134, 19137, 19156, 19174, 19181.
+  19095, 19124, 19125, 19129, 19134, 19137, 19156, 19174, 19181, 19189.
 
 * A defect in the malloc implementation, present since glibc 2.15 (2012) or
   glibc 2.10 via --enable-experimental-malloc (2009), could result in the
diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c
index 9806ab6..b348f41 100644
--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c
+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c
@@ -130,8 +130,8 @@ __log1pl (long double xm1)
   /* Test for NaN or infinity input. */
   u.value = xm1;
   hx = u.parts32.w0;
-  if (hx >= 0x7fff0000)
-    return xm1;
+  if ((hx & 0x7fffffff) >= 0x7fff0000)
+    return xm1 + fabsl (xm1);
 
   /* log1p(+- 0) = +- 0.  */
   if (((hx & 0x7fffffff) == 0)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                           |    4 ++++
 NEWS                                |    2 +-
 sysdeps/ieee754/ldbl-128/s_log1pl.c |    4 ++--
 3 files changed, 7 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources



More information about the Glibc-cvs mailing list