glibc/x86-cpuid-level2.patch
Andreas Jaeger 804db197ba Accepting request 80935 from home:a_jaeger:branches:openSUSE:Factory
- Do not not trigger an abort when an i586 Intel CPU is running the
  i686 library, as valgrind does. [bnc#681398]
- Readd vdso support.
- Add patch to relocate objects in dependency order, this fixes the

OBS-URL: https://build.opensuse.org/request/show/80935
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=102
2011-09-05 12:34:49 +00:00

28 lines
790 B
Diff

openSUSE bug report:
https://bugzilla.novell.com/show_bug.cgi?id=681398
Patch from Debian, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584748
---
sysdeps/x86_64/cacheinfo.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/sysdeps/x86_64/cacheinfo.c
+++ b/sysdeps/x86_64/cacheinfo.c
@@ -254,7 +254,13 @@
static long int __attribute__ ((noinline))
handle_intel (int name, unsigned int maxidx)
{
- assert (maxidx >= 2);
+ if (maxidx <= 2)
+ {
+ /* This should never happen as all Intel i686 CPU support a CPUID
+ level of 2 minimum. However valgrind sometimes load the i686
+ library with a P55C CPUID. Return 0 in that case. */
+ return 0;
+ }
/* OK, we can use the CPUID instruction to get all info about the
caches. */