From 1aef4dc72c9b77c6c4c4edceb1e461bc21f91590 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 7 Jul 2015 13:01:39 +0000 Subject: [PATCH] 349828 memcpy intercepts memmove causing src/dst overlap error (ppc64 ld.so) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15397 --- NEWS | 1 + shared/vg_replace_strmem.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index 85e75299fc..48fe21c82a 100644 --- a/NEWS +++ b/NEWS @@ -249,6 +249,7 @@ where XXXXXX is the bug number as listed below. reply 0x........] (task_set_special_port) 349626 Implemented additional Xen hypercalls 349874 Fix typos in source code +349828 memcpy intercepts memmove causing src/dst overlap error (ppc64 ld.so) n-i-bz Provide implementations of certain compiler builtins to support compilers who may not provide those n-i-bz Old STABS code is still being compiled, but never used. Remove it. diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c index d4e54492df..0f366bf1c1 100644 --- a/shared/vg_replace_strmem.c +++ b/shared/vg_replace_strmem.c @@ -1141,6 +1141,10 @@ static inline void my_exit ( int x ) #if defined(VGO_linux) MEMMOVE(VG_Z_LIBC_SONAME, memmove) MEMMOVE(VG_Z_LIBC_SONAME, __GI_memmove) + /* See bug #349828 Override for ld64.so.1 like memcpy, because for some + arches MEMCPY_OK_FOR_FORWARD_MEMMOVE is set, which might cause memmove + to call memcpy. */ + MEMMOVE(VG_Z_LD64_SO_1, memmove) #elif defined(VGO_darwin) # if DARWIN_VERS <= DARWIN_10_6 -- 2.47.2