This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/11120] New: strncmp() will be broken if used in ld.so on x86-64
- From: "mrs at mythic-beasts dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 31 Dec 2009 11:00:49 -0000
- Subject: [Bug libc/11120] New: strncmp() will be broken if used in ld.so on x86-64
- Reply-to: sourceware-bugzilla at sourceware dot org
As of 7956a3d2, sysdeps/x86_64/strcmp.S implements optimised versions
of both strcmp() and strncmp(). When this file is built into ld.so,
however, it falls back to using the unoptimised code which implements
only strcmp(). If strncmp() is ever used in ld.so on x86-64 it will
silently be implemented as strcmp().
Whether to fix this is upto the glibc developers. If you don't want
to fix this I would suggest adding the following to the top of
sysdeps/x86_64/strncmp.S so that strncmp()'s behaviour does not come
as a surprise if it is ever used in this context:
#ifdef NOT_IN_libc
# error "Not implemented for ld.so"
#endif
--
Summary: strncmp() will be broken if used in ld.so on x86-64
Product: glibc
Version: 2.11
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: mrs at mythic-beasts dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=11120
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.