From 7ada4d26d7cd3eb14904a398e6646f8b4e7d8a64 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 3 Feb 2021 16:56:14 +0100 Subject: [PATCH] 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 --- coregrind/m_syswrap/syswrap-linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.47.2