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-268-g6a82476


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  6a824767d8948faf10d8d3a602eb4f2a59431601 (commit)
      from  5e9d98a3d9eec0a18e6875f6e86a3886fbb7e543 (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=6a824767d8948faf10d8d3a602eb4f2a59431601

commit 6a824767d8948faf10d8d3a602eb4f2a59431601
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Oct 12 08:22:52 2016 -0700

    X86: Don't assert on older Intel CPUs [BZ #20647]
    
    Since the maximum CPUID level of older Intel CPUs is 1, change
    handle_intel to return -1, instead of assert, when the maximum
    CPUID level is less than 2.
    
    	[BZ #20647]
    	* sysdeps/x86/cacheinfo.c (handle_intel): Return -1 if the
    	maximum CPUID level is less than 2.

diff --git a/ChangeLog b/ChangeLog
index d129219..81dd89f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-10-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	[BZ #20647]
+	* sysdeps/x86/cacheinfo.c (handle_intel): Return -1 if the
+	maximum CPUID level is less than 2.
+
 2016-10-12  Joseph Myers  <joseph@codesourcery.com>
 
 	* math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_BFP_EXT)]
diff --git a/sysdeps/x86/cacheinfo.c b/sysdeps/x86/cacheinfo.c
index cf4f64b..35268e8 100644
--- a/sysdeps/x86/cacheinfo.c
+++ b/sysdeps/x86/cacheinfo.c
@@ -259,7 +259,9 @@ intel_check_word (int name, unsigned int value, bool *has_level_2,
 static long int __attribute__ ((noinline))
 handle_intel (int name, unsigned int maxidx)
 {
-  assert (maxidx >= 2);
+  /* Return -1 for older CPUs.  */
+  if (maxidx < 2)
+    return -1;
 
   /* OK, we can use the CPUID instruction to get all info about the
      caches.  */

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

Summary of changes:
 ChangeLog               |    6 ++++++
 sysdeps/x86/cacheinfo.c |    4 +++-
 2 files changed, 9 insertions(+), 1 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]