Created attachment 129936 [details] Workaround patch shmat() appears to send the wrong syscall arguments for shmctl() during ML_(generic_PRE_sys_shmat) in get_shm_size() (file coregrind/m_syswrap/syswrap-generic.c) when run in x86 32-bit mode. This fails on both a 32-bit or 64-bit kernel. The attached patch allows for a workaround for this specific issue (but not tested in other environments or systems; this is only intended to pinpoint the problem). The workaround is to remove the VKI_IPC_64 (IPC_64) flag in the sysctl() syscall. This issue was observed when compiling 32-bit valgrind, versions 3.16.0 or 3.16.1, on both RedHat Enterprise Linux 4 and Gentoo (latest version). valgrind 3.15.0 works OK. Linux - 5.5.2 #2 SMP Fri Feb 7 15:47:00 EST 2020 x86_64 x86_64 x86_64 GNU/Linux
Created attachment 129937 [details] Compile log
Created attachment 129938 [details] Valgrind and strace log
*** This bug has been marked as a duplicate of bug 410743 ***