This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12159] New: strchr (x86-64/multiarch/SSE4.2) handles second parameter incorrectly.
- From: "richardpku at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Mon, 25 Oct 2010 16:04:08 +0000
- Subject: [Bug libc/12159] New: strchr (x86-64/multiarch/SSE4.2) handles second parameter incorrectly.
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=12159
Summary: strchr (x86-64/multiarch/SSE4.2) handles second
parameter incorrectly.
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper.fsp@gmail.com
ReportedBy: richardpku@gmail.com
sysdeps/x86-64/multiarch/strchr.S (Both glibc-2.12.1 and latest git version):
If %rdi is aligned to a 16-byte boundary, the value of %xmm1 is not properly
set. The following program exposes this problem:
#include <stdio.h>
#include <string.h>
int main ()
{
char s[] __attribute__((aligned(16))) = "\xff";
printf ("%p\n", strchr (s, '\xfe'));
return 0;
}
It is expected to output "(nil)", but it actually prints a valid pointer if run
on an x86-64 system with a multiarch-enabled glibc and a CPU which supports
SSE4.2.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.