From: Philippe Waroquiers Date: Wed, 17 Dec 2014 20:39:55 +0000 (+0000) Subject: Fix 341789 - aarch64: shmat fails with valgrind on ARMv8 X-Git-Tag: svn/VALGRIND_3_11_0~765 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9bb6c68c096342fce985f88242b5d5fb92214f3c;p=thirdparty%2Fvalgrind.git Fix 341789 - aarch64: shmat fails with valgrind on ARMv8 arm64, like amd64, must not use VKI_IPC_64, even if this symbol is defined. This makes the shmctl fail, which results in a zero size returned, which means that the succesful shmat is not reported to the aspacemgr. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14821 --- diff --git a/NEWS b/NEWS index 3ea2c08e71..2e9e57c947 100644 --- a/NEWS +++ b/NEWS @@ -94,6 +94,7 @@ where XXXXXX is the bug number as listed below. 340856 disInstr(arm64): unhandled instruction 0x1E634C45 (fcsel) 340922 arm64: unhandled getgroups/setgroups syscalls 341238 Recognize GCC5/DWARFv5 DW_LANG constants (Go, C11, C++11, C++14) +341789 aarch64: shmat fails with valgrind on ARMv8 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/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 56d5718a5e..c506232d31 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -1858,7 +1858,7 @@ SizeT get_shm_size ( Int shmid ) #ifdef __NR_shmctl # ifdef VKI_IPC_64 struct vki_shmid64_ds buf; -# ifdef VGP_amd64_linux +# if defined(VGP_amd64_linux) || defined(VGP_arm64_linux) /* See bug 222545 comment 7 */ SysRes __res = VG_(do_syscall3)(__NR_shmctl, shmid, VKI_IPC_STAT, (UWord)&buf);