Sourceware Bugzilla – Attachment 5323 Details for
Bug 12518
memcpy acts randomly (and differently) with overlapping areas
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
A patch
libc-pr12518-1.patch (text/plain), 2.23 KB, created by
H.J. Lu
on 2011-03-25 04:37:07 UTC
(
hide
)
Description:
A patch
Filename:
MIME Type:
Creator:
H.J. Lu
Created:
2011-03-25 04:37:07 UTC
Size:
2.23 KB
patch
obsolete
>2011-03-24 H.J. Lu <hongjiu.lu@intel.com> > > PR libc/12518 > * string/Versions: Add memcpy to GLIBC_2.13. > > * sysdeps/x86_64/multiarch/memcpy.S: Include <shlib-compat.h>. > (memcpy): Renamed to ... > (__new_memcpy): This. > (memcpy): Provide GLIBC_2_13 memcpy. > > * sysdeps/x86_64/multiarch/memmove.c: Include <shlib-compat.h>. > (memcpy): Provide GLIBC_2_2_5 memcpy. > >diff --git a/string/Versions b/string/Versions >index f145fd3..b7bf235 100644 >--- a/string/Versions >+++ b/string/Versions >@@ -80,4 +80,7 @@ libc { > GLIBC_2.6 { > strerror_l; > } >+ GLIBC_2.13 { >+ memcpy; >+ } > } >diff --git a/sysdeps/x86_64/multiarch/memcpy.S b/sysdeps/x86_64/multiarch/memcpy.S >index 8e9fb19..d83059a 100644 >--- a/sysdeps/x86_64/multiarch/memcpy.S >+++ b/sysdeps/x86_64/multiarch/memcpy.S >@@ -19,6 +19,7 @@ > 02111-1307 USA. */ > > #include <sysdep.h> >+#include <shlib-compat.h> > #include <init-arch.h> > > /* Define multiple versions only for the definition in lib and for >@@ -26,8 +27,8 @@ > happened. */ > #if defined SHARED && !defined NOT_IN_libc > .text >-ENTRY(memcpy) >- .type memcpy, @gnu_indirect_function >+ENTRY(__new_memcpy) >+ .type __new_memcpy, @gnu_indirect_function > cmpl $0, KIND_OFFSET+__cpu_features(%rip) > jne 1f > call __init_cpu_features >@@ -39,7 +40,7 @@ ENTRY(memcpy) > jz 2f > leaq __memcpy_ssse3_back(%rip), %rax > 2: ret >-END(memcpy) >+END(__new_memcpy) > > # undef ENTRY > # define ENTRY(name) \ >@@ -68,6 +69,8 @@ END(memcpy) > by the indirect call in the PLT. */ > # define libc_hidden_builtin_def(name) \ > .globl __GI_memcpy; __GI_memcpy = __memcpy_sse2 >+ >+versioned_symbol (libc, __new_memcpy, memcpy, GLIBC_2_13); > #endif > > #include "../memcpy.S" >diff --git a/sysdeps/x86_64/multiarch/memmove.c b/sysdeps/x86_64/multiarch/memmove.c >index 3798627..04692ab 100644 >--- a/sysdeps/x86_64/multiarch/memmove.c >+++ b/sysdeps/x86_64/multiarch/memmove.c >@@ -20,6 +20,7 @@ > #include <string.h> > > #ifndef NOT_IN_libc >+#include <shlib-compat.h> > #include "init-arch.h" > > #define MEMMOVE __memmove_sse2 >@@ -42,4 +43,8 @@ libc_ifunc (memmove, > ? (HAS_FAST_COPY_BACKWARD > ? __memmove_ssse3_back : __memmove_ssse3) > : __memmove_sse2); >+ >+#if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_13) >+compat_symbol (libc, memmove, memcpy, GLIBC_2_2_5); >+#endif > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 12518
:
5264
| 5323 |
5341
|
5660