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.20-419-g0dacd7a


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  0dacd7a3b9401f7eb7160cf79231a4573773c5da (commit)
      from  929011700ce09f2bb4f6f650ae95b6eb68145deb (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=0dacd7a3b9401f7eb7160cf79231a4573773c5da

commit 0dacd7a3b9401f7eb7160cf79231a4573773c5da
Author: Chris Metcalf <cmetcalf@ezchip.com>
Date:   Mon Dec 22 14:50:26 2014 -0500

    tilegx: remove implicit boolean conversion in strstr.
    
    [BZ #17746]
    The __builtin_expect() truncated a uint64_t to a 32-bit long
    in ILP32 mode, discarding the high 32 bits, and potentially
    missing the NUL terminator that we were searching for with SIMD
    operations.  Explicitly compare to zero to fix the problem.

diff --git a/ChangeLog b/ChangeLog
index 4ad8b90..77abebf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-12-22  Chris Metcalf  <cmetcalf@ezchip.com>
+
+	[BZ #17746]
+	* sysdeps/tile/tilegx/strstr.c (STRSTR2): Remove implicit boolean
+	conversion.
+
 2014-12-22  Steve Ellcey  <sellcey@imgtec.com>
 
 	* sysdeps/unix/mips/sysdep.h (__mips_isa_rev): Set
diff --git a/NEWS b/NEWS
index cf0756b..56dfff0 100644
--- a/NEWS
+++ b/NEWS
@@ -15,7 +15,7 @@ Version 2.21
   17522, 17555, 17570, 17571, 17572, 17573, 17574, 17581, 17582, 17583,
   17584, 17585, 17589, 17594, 17601, 17608, 17616, 17625, 17630, 17633,
   17634, 17647, 17653, 17657, 17664, 17665, 17668, 17682, 17717, 17719,
-  17722, 17724, 17725, 17733, 17744, 17745.
+  17722, 17724, 17725, 17733, 17744, 17745, 17746.
 
 * CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag
   under certain input conditions resulting in the execution of a shell for
diff --git a/sysdeps/tile/tilegx/strstr.c b/sysdeps/tile/tilegx/strstr.c
index d04f129..de5adaf 100644
--- a/sysdeps/tile/tilegx/strstr.c
+++ b/sysdeps/tile/tilegx/strstr.c
@@ -154,7 +154,7 @@ STRSTR2 (const char *haystack_start, const char *needle)
       /* Look for a terminating '\0'.  */
       zero_matches = __insn_v1cmpeqi (v, 0);
       uint64_t byte1_matches = __insn_v1cmpeq (v, byte1);
-      if (__builtin_expect (zero_matches, 0))
+      if (__builtin_expect (zero_matches != 0, 0))
 	{
 	  /* This is the last vector.  Don't worry about matches
 	     crossing into the next vector.  Shift the second byte

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

Summary of changes:
 ChangeLog                    |    6 ++++++
 NEWS                         |    2 +-
 sysdeps/tile/tilegx/strstr.c |    2 +-
 3 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]