summaryrefslogtreecommitdiffstats
path: root/patches/source/glibc/glibc.6a824767.dont.assert.on.older.intel.cpus.diff
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2018-05-25 23:29:36 +0000
committer Eric Hameleers <alien@slackware.com>2018-06-01 00:36:01 +0200
commit39366733c3fe943363566756e2e152c45a1b3cb2 (patch)
tree228b0735896af90ca78151c9a69aa3efd12c8cae /patches/source/glibc/glibc.6a824767.dont.assert.on.older.intel.cpus.diff
parentd31c50870d0bee042ce660e445c9294a59a3a65b (diff)
downloadcurrent-14.2.tar.gz
current-14.2.tar.xz
Fri May 25 23:29:36 UTC 201814.2
patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.2.txz: Rebuilt. Handle removal of US/Pacific-New timezone. If we see that the machine is using this, it will be automatically switched to US/Pacific.
Diffstat (limited to 'patches/source/glibc/glibc.6a824767.dont.assert.on.older.intel.cpus.diff')
-rw-r--r--patches/source/glibc/glibc.6a824767.dont.assert.on.older.intel.cpus.diff32
1 files changed, 32 insertions, 0 deletions
diff --git a/patches/source/glibc/glibc.6a824767.dont.assert.on.older.intel.cpus.diff b/patches/source/glibc/glibc.6a824767.dont.assert.on.older.intel.cpus.diff
new file mode 100644
index 000000000..a3d1b147f
--- /dev/null
+++ b/patches/source/glibc/glibc.6a824767.dont.assert.on.older.intel.cpus.diff
@@ -0,0 +1,32 @@
+From 6a824767d8948faf10d8d3a602eb4f2a59431601 Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" <hjl.tools@gmail.com>
+Date: Wed, 12 Oct 2016 08:22:52 -0700
+Subject: [PATCH] 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_64/cacheinfo.c (handle_intel): Return -1 if the
+ maximum CPUID level is less than 2.
+
+diff --git a/sysdeps/x86_64/cacheinfo.c b/sysdeps/x86_64/cacheinfo.c
+index cf4f64b..35268e8 100644
+--- a/sysdeps/x86_64/cacheinfo.c
++++ b/sysdeps/x86_64/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. */
+--
+2.9.3
+
+