]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix 341789 - aarch64: shmat fails with valgrind on ARMv8
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 17 Dec 2014 20:39:55 +0000 (20:39 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 17 Dec 2014 20:39:55 +0000 (20:39 +0000)
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

NEWS
coregrind/m_syswrap/syswrap-generic.c

diff --git a/NEWS b/NEWS
index 3ea2c08e71cf6d5ba17d44147fd4fbc2441ffae6..2e9e57c94782f9305df96093668b8dba77a3c724 100644 (file)
--- 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.
index 56d5718a5e10e5e0aba30149737e63474fb9ec5a..c506232d31bf0bd0ab378b5cb4d1edd4ddb5eb75 100644 (file)
@@ -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);