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-633-g4dfb9c9


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  4dfb9c941132d7b10b897c678f360fd27d6f5c95 (commit)
      from  6a1cefac196f45d766027c97a6c8c44459c9cccd (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=4dfb9c941132d7b10b897c678f360fd27d6f5c95

commit 4dfb9c941132d7b10b897c678f360fd27d6f5c95
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Thu Jan 12 01:52:37 2017 +0000

    Make fallback fegetexceptflag work with generic fetestexceptflag.
    
    The generic implementation of fetestexceptflag does:
    
    int
    fetestexceptflag (const fexcept_t *flagp, int excepts)
    {
      /* Most versions of fegetexceptflag store exceptions in a form such
         that this works.  */
      return *flagp & excepts & FE_ALL_EXCEPT;
    }
    
    In the case where FE_ALL_EXCEPT is nonzero but exceptions may not be
    supported at runtime, this only works if fegetexceptflag cleared all
    the bits of FE_ALL_EXCEPT in *flagp; otherwise it accesses
    uninitialized data.  This showed up as a failure of
    math/test-fetestexceptflag for MIPS o32 soft-float.  This patch makes
    the fallback fegetexceptflag store 0 (fexcept_t is an integer type
    everywhere) so that this works.  (No bug report in Bugzilla because
    this wasn't user-visible - at least, without using tools to detect
    uninitialized memory use at runtime - without fetestexceptflag, which
    is new in 2.25.)
    
    Tested for MIPS o32 soft-float.
    
    	* math/fgetexcptflg.c (__fegetexceptflag): Store 0 in fexcept_t
    	object.

diff --git a/ChangeLog b/ChangeLog
index d86a9c7..5b0601f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-12  Joseph Myers  <joseph@codesourcery.com>
+
+	* math/fgetexcptflg.c (__fegetexceptflag): Store 0 in fexcept_t
+	object.
+
 2017-01-11  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #16458]
diff --git a/math/fgetexcptflg.c b/math/fgetexcptflg.c
index 8e16250..95a9217 100644
--- a/math/fgetexcptflg.c
+++ b/math/fgetexcptflg.c
@@ -24,6 +24,7 @@ int
 __fegetexceptflag (fexcept_t *flagp, int excepts)
 {
   /* Nothing to do.  */
+  *flagp = 0;
   return 0;
 }
 #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)

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

Summary of changes:
 ChangeLog           |    5 +++++
 math/fgetexcptflg.c |    1 +
 2 files changed, 6 insertions(+), 0 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]