|
Sources Bugzilla – Full Text Bug Listing |
| Summary: | Bad x86-64 strncasecmp on Intel Core i7 | ||
|---|---|---|---|
| Product: | glibc | Reporter: | H.J. Lu <hjl.tools> |
| Component: | libc | Assignee: | Ulrich Drepper <drepper.fsp> |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | ||
| Priority: | P2 | ||
| Version: | 2.13 | ||
| Target Milestone: | --- | ||
| URL: | http://sourceware.org/ml/libc-alpha/2010-11/msg00031.html | ||
| Host: | Target: | ||
| Build: | Last reconfirmed: | ||
| Attachments: | A patch | ||
|
Description
H.J. Lu
2010-11-09 23:45:45 UTC
[hjl@gnu-35 junk-1]$ cat test.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static char cp [4096+16] __attribute__ ((aligned(4096)));
static char gotrel[4096] __attribute__ ((aligned(4096)));
int
main ()
{
char *p = cp + 0xffa;
char *g = gotrel + 0xcbe;
strcpy (p, "gottpoff");
strcpy (g, "GOTPLT");
printf ("%p: %s\n", p, p);
printf ("%p: %s\n", g, g);
if (strncasecmp (p, g, 6) <= 0)
abort ();
return 0;
}
[hjl@gnu-35 junk-1]$ make
cc test.c -o test
./test
0x602ffa: gottpoff
0x604cbe: GOTPLT
make: *** [all] Aborted
[hjl@gnu-35 junk-1]$
Created attachment 5118 [details]
A patch
Patch is in git. |