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

GNU C Library master sources branch master updated. glibc-2.26.9000-1109-gb303185


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  b303185df9b4f3d097956fe566a32aed4f85b127 (commit)
      from  ee61d0285029d35ebb03bdd548ccce948ebfaea5 (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=b303185df9b4f3d097956fe566a32aed4f85b127

commit b303185df9b4f3d097956fe566a32aed4f85b127
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Jan 10 17:59:01 2018 +0000

    Fix ldbl-128ibm log1pl (-qNaN) spurious "invalid" exception (bug 22693).
    
    The ldbl-128ibm implementation of log1pl does ordered comparisons on a
    negative qNaN argument, so resulting in spurious "invalid" exceptions
    (for soft-float powerpc; hard-float only avoids this because of GCC
    bug 58684 meaning ordered comparison instructions never get
    generated).  This patch fixes this by arranging for the test for NaN
    or infinity arguments to handle negative arguments as well.
    
    Tested for powerpc (soft float).
    
    	[BZ #22693]
    	* sysdeps/ieee754/ldbl-128ibm/s_log1pl.c (__log1pl): Handle
    	negative arguments in test for NaN or infinity argument.

diff --git a/ChangeLog b/ChangeLog
index ceb8333..3025edf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-01-10  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #22693]
+	* sysdeps/ieee754/ldbl-128ibm/s_log1pl.c (__log1pl): Handle
+	negative arguments in test for NaN or infinity argument.
+
 2018-01-10  Dmitry V. Levin  <ldv@altlinux.org>
 
 	* po/libc.pot: Regenerate.
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c b/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
index 5457892..e499c9f 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
@@ -131,8 +131,8 @@ __log1pl (long double xm1)
   /* Test for NaN or infinity input. */
   xhi = ldbl_high (xm1);
   EXTRACT_WORDS (hx, lx, xhi);
-  if (hx >= 0x7ff00000)
-    return xm1 + xm1;
+  if ((hx & 0x7fffffff) >= 0x7ff00000)
+    return xm1 + xm1 * xm1;
 
   /* log1p(+- 0) = +- 0.  */
   if (((hx & 0x7fffffff) | lx) == 0)

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

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


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


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