]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
syswrap-linux.c: Pass implicit VKI_IPC_64 for shmctl also on arm64.
authorMark Wielaard <mark@klomp.org>
Wed, 3 Feb 2021 15:56:14 +0000 (16:56 +0100)
committerMark Wielaard <mark@klomp.org>
Wed, 3 Feb 2021 18:50:21 +0000 (19:50 +0100)
The shmctl syscall on amd64, arm64 and riscv (but we don't have a port
for that last one) always use IPC_64. Explicitly pass it to the generic
PRE/POST handlers so they select the correct (64bit) data structures on
those architectures.

https://bugzilla.redhat.com/show_bug.cgi?id=1909548

coregrind/m_syswrap/syswrap-linux.c

index 328e02a9803003af1a3d1059984d8a078968348d..52074149d7a65baf763418d91a601a5a7d4121e2 100644 (file)
@@ -5127,7 +5127,7 @@ PRE(sys_shmctl)
    PRINT("sys_shmctl ( %ld, %ld, %#" FMT_REGWORD "x )", SARG1, SARG2, ARG3);
    PRE_REG_READ3(long, "shmctl",
                  int, shmid, int, cmd, struct shmid_ds *, buf);
-#ifdef VGP_amd64_linux
+#if defined(VGP_amd64_linux) || defined(VGP_arm64_linux)
    ML_(generic_PRE_sys_shmctl)(tid, ARG1,ARG2|VKI_IPC_64,ARG3);
 #else
    ML_(generic_PRE_sys_shmctl)(tid, ARG1,ARG2,ARG3);
@@ -5136,7 +5136,7 @@ PRE(sys_shmctl)
 
 POST(sys_shmctl)
 {
-#ifdef VGP_amd64_linux
+#if defined(VGP_amd64_linux) || defined(VGP_arm64_linux)
    ML_(generic_POST_sys_shmctl)(tid, RES,ARG1,ARG2|VKI_IPC_64,ARG3);
 #else
    ML_(generic_POST_sys_shmctl)(tid, RES,ARG1,ARG2,ARG3);