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 release/2.26/master updated. glibc-2.26-70-gb1b8d8a


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, release/2.26/master has been updated
       via  b1b8d8aa95a055dc7929259679a995189d444809 (commit)
       via  f8279a4b3cc66d3ec8bfb8519e9987b8f7727f53 (commit)
      from  f82a6fc223cbd890b9de9007cfce63e6cae8f799 (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=b1b8d8aa95a055dc7929259679a995189d444809

commit b1b8d8aa95a055dc7929259679a995189d444809
Author: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
Date:   Fri Oct 20 16:06:19 2017 -0200

    Add missing bug fixes to NEWS

diff --git a/NEWS b/NEWS
index c92ec03..bf4fd66 100644
--- a/NEWS
+++ b/NEWS
@@ -36,6 +36,7 @@ The following bugs are resolved with this release:
   [21972] assert macro requires operator== (int) for its argument type
   [21982] string: stratcliff.c: error: assuming signed overflow does not
     occur with -O3
+  [21987] Fix sparc32 bits/long-double.h
   [22051] libc: zero terminator in the middle of glibc's .eh_frame
   [22078] nss_files performance issue in hosts multi mode
   [22093] x86: Add x86_64 to x86-64 HWCAP
@@ -46,6 +47,7 @@ The following bugs are resolved with this release:
   [22225] math: nearbyint arithmetic moved before feholdexcept
   [22235] Add C++ versions of iscanonical for ldbl-96 and ldbl-128ibm
   [22296] Let signbit use the builtin in C++ mode with gcc < 6.x
+  [22320] glob: Fix one-byte overflow (CVE-2017-15670)
   [22321] sysconf: Fix missing definition of UIO_MAXIOV on Linux
   [22325] glibc: Memory leak in glob with GLOB_TILDE (CVE-2017-15671)
 

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

commit f8279a4b3cc66d3ec8bfb8519e9987b8f7727f53
Author: Romain Naour <romain.naour@gmail.com>
Date:   Mon Oct 16 23:21:56 2017 +0200

    Let signbit use the builtin in C++ mode with gcc < 6.x (bug 22296)
    
    When using gcc < 6.x, signbit does not use the type-generic
    __builtin_signbit builtin, instead it uses __MATH_TG.
    However, when library support for float128 is available, __MATH_TG uses
    __builtin_types_compatible_p, which is not available in C++ mode.
    
    On the other hand, libstdc++ undefines (in cmath) many macros from
    math.h, including signbit, so that it can provide its own functions.
    However, during its configure tests, libstdc++ just tests for the
    availability of the macros (it does not undefine them, nor does it
    provide its own functions).
    
    Finally, libstdc++ configure tests include math.h and get the definition
    of signbit that uses __MATH_TG (and __builtin_types_compatible_p).
    Since libstdc++ does not undefine the macros during its configure
    tests, they fail.
    
    This patch lets signbit use the builtin in C++ mode when gcc < 6.x is
    used. This allows the configure test in libstdc++ to work.
    
    Tested for x86_64.
    
    	[BZ #22296]
    	* math/math.h: Let signbit use the builtin in C++ mode with gcc
    	< 6.x
    
    Cc: Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
    Cc: Joseph Myers <joseph@codesourcery.com>
    (cherry picked from commit 386e1c26ac473d6863133ab9cbe3bbda16c15816)

diff --git a/ChangeLog b/ChangeLog
index cd59878..6e53277 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-10-17  Romain Naour  <romain.naour@gmail.com>  (tiny change)
+
+	[BZ #22296]
+	* math/math.h: Let signbit use the builtin in C++ mode with gcc
+	< 6.x
+
 2017-10-22  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #21265]
diff --git a/NEWS b/NEWS
index 87d4802..c92ec03 100644
--- a/NEWS
+++ b/NEWS
@@ -45,6 +45,7 @@ The following bugs are resolved with this release:
   [22146] Let fpclassify use the builtin when optimizing for size in C++ mode
   [22225] math: nearbyint arithmetic moved before feholdexcept
   [22235] Add C++ versions of iscanonical for ldbl-96 and ldbl-128ibm
+  [22296] Let signbit use the builtin in C++ mode with gcc < 6.x
   [22321] sysconf: Fix missing definition of UIO_MAXIOV on Linux
   [22325] glibc: Memory leak in glob with GLOB_TILDE (CVE-2017-15671)
 
diff --git a/math/math.h b/math/math.h
index 2b216c6..ba26624 100644
--- a/math/math.h
+++ b/math/math.h
@@ -418,6 +418,15 @@ enum
 /* Return nonzero value if sign of X is negative.  */
 # if __GNUC_PREREQ (6,0)
 #  define signbit(x) __builtin_signbit (x)
+# elif defined __cplusplus
+  /* In C++ mode, __MATH_TG cannot be used, because it relies on
+     __builtin_types_compatible_p, which is a C-only builtin.
+     The check for __cplusplus allows the use of the builtin instead of
+     __MATH_TG. This is provided for libstdc++, only to let its configure
+     test work. No further use of this definition of signbit is expected
+     in C++ mode, since libstdc++ provides its own version of signbit
+     in cmath (which undefines signbit). */
+#  define signbit(x) __builtin_signbitl (x)
 # elif __GNUC_PREREQ (4,0)
 #  define signbit(x) __MATH_TG ((x), __builtin_signbit, (x))
 # else

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

Summary of changes:
 ChangeLog   |    6 ++++++
 NEWS        |    3 +++
 math/math.h |    9 +++++++++
 3 files changed, 18 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]