From: Mark Wielaard Date: Wed, 3 Feb 2021 15:56:14 +0000 (+0100) Subject: syswrap-linux.c: Pass implicit VKI_IPC_64 for shmctl also on arm64. X-Git-Tag: VALGRIND_3_17_0~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ada4d26d7cd3eb14904a398e6646f8b4e7d8a64;p=thirdparty%2Fvalgrind.git syswrap-linux.c: Pass implicit VKI_IPC_64 for shmctl also on arm64. 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 --- diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 328e02a980..52074149d7 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -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);