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.24-618-gf68fcd9


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  f68fcd95d34d2f2ac286b9ebb64e3a07e36a20cf (commit)
      from  38765ab68f329fd84a5984decc8953f8c89d6e5c (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=f68fcd95d34d2f2ac286b9ebb64e3a07e36a20cf

commit f68fcd95d34d2f2ac286b9ebb64e3a07e36a20cf
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Thu Jan 5 23:15:47 2017 +0000

    Make fallback fesetexceptflag always succeed (bug 21028).
    
    The fallback implementation of fesetexceptflag currently fails if any
    exceptions are specified.  It should always succeed, because the
    exception state is always that all exceptions (if any are defined in
    <fenv.h> but not supported in this configuration) are always clear,
    just as fallback fetestexcept always succeeds and fallback fesetenv
    always succeeds unless asked to set FE_NOMASK_ENV.
    
    This patch fixes it accordingly.  Together with the patch to
    test-fexcept.c to allow feraiseexcept to fail in another place, this
    stops that test from failing for MIPS soft-float.
    
    Tested for mips64 soft-float.
    
    	[BZ #21028]
    	* math/fsetexcptflg.c (__fesetexceptflag): Always return 0.
    	* math/test-fexcept.c (test_set): Allow failure of feraiseexcept
    	if EXCEPTION_TESTS returns false.

diff --git a/ChangeLog b/ChangeLog
index c67476f..172b0c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-01-05  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #21028]
+	* math/fsetexcptflg.c (__fesetexceptflag): Always return 0.
+	* math/test-fexcept.c (test_set): Allow failure of feraiseexcept
+	if EXCEPTION_TESTS returns false.
+
 2017-01-05  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
 	[BZ #20558]
diff --git a/math/fsetexcptflg.c b/math/fsetexcptflg.c
index 2e8237e..e79095b 100644
--- a/math/fsetexcptflg.c
+++ b/math/fsetexcptflg.c
@@ -23,8 +23,9 @@
 int
 __fesetexceptflag (const fexcept_t *flagp, int excepts)
 {
-  /* This always fails unless nothing needs to be done.  */
-  return (excepts != 0);
+  /* This always succeeds, as all exceptions are always clear
+     (including in the saved state) so nothing needs to be done.  */
+  return 0;
 }
 #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
 strong_alias (__fesetexceptflag, __old_fesetexceptflag)
diff --git a/math/test-fexcept.c b/math/test-fexcept.c
index 6aa54b4..8540801 100644
--- a/math/test-fexcept.c
+++ b/math/test-fexcept.c
@@ -61,7 +61,13 @@ test_set (int initial, const fexcept_t *saved, int mask, int expected)
   if (ret != 0)
     {
       puts ("feraiseexcept failed");
-      result = 1;
+      if (initial == 0 || EXCEPTION_TESTS (float))
+	{
+	  puts ("failure of feraiseexcept was unexpected");
+	  result = 1;
+	}
+      else
+	puts ("failure of feraiseexcept OK, skipping further tests");
       return result;
     }
   ret = fesetexceptflag (saved, mask);

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

Summary of changes:
 ChangeLog           |    7 +++++++
 math/fsetexcptflg.c |    5 +++--
 math/test-fexcept.c |    8 +++++++-
 3 files changed, 17 insertions(+), 3 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]