From: GNU Libc Maintainers Date: Sun, 4 Dec 2016 21:49:53 +0000 (+0000) Subject: cvs-cpuid-level2 X-Git-Tag: archive/raspbian/2.25-3+rpi1~1^2^2^2^2^2^2^2^2~63 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9fe98797b29ac3b954bca3636ca578e6668cae31;p=glibc.git cvs-cpuid-level2 2016-10-12 H.J. Lu [BZ #20647] * sysdeps/x86/cacheinfo.c (handle_intel): Return -1 if the maximum CPUID level is less than 2. Gbp-Pq: Topic i386 Gbp-Pq: Name cvs-cpuid-level2.diff --- diff --git a/sysdeps/x86/cacheinfo.c b/sysdeps/x86/cacheinfo.c index cf4f64b0d..35268e8d9 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. */