]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Bug 444552 - s390x: Fix sys_ipc semtimedop syscall
authorAndreas Arnez <arnez@linux.ibm.com>
Wed, 5 Jan 2022 18:49:19 +0000 (19:49 +0100)
committerAndreas Arnez <arnez@linux.ibm.com>
Fri, 18 Feb 2022 18:46:47 +0000 (19:46 +0100)
On s390x Linux platforms the sys_ipc semtimedop call has four instead of
five parameters, where the timeout is passed in the third instead of the
fifth.

Reflect this difference in the handling of VKI_SEMTIMEDOP.

NEWS
coregrind/m_syswrap/syswrap-linux.c

diff --git a/NEWS b/NEWS
index 3151e560ed752bfb06a7941f7ddd43b13b717543..e4f2b7141105990c8c92691a5da65c75441bf668 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -46,6 +46,7 @@ are not entered into bugzilla tend to get forgotten about or ignored.
         == 434283
 444481  gdb_server test failures on s390x
 444495  dhat/tests/copy fails on s390x
+444552  memcheck/tests/sem fails on s390x with glibc 2.34
 444571  PPC, fix the lxsibzx and lxsihzx so they only load their respective
         sized data.
 444836  PPC, pstq instruction for R=1 is not storing to the correct address.
index 792589766bb9a2e68fbfd108c802b8428d9eae4a..b9d531de38bcbeb50f6a127c36f9c89772648e53 100644 (file)
@@ -4774,10 +4774,20 @@ PRE(sys_ipc)
       break;
    }
    case VKI_SEMTIMEDOP:
+#ifdef VGP_s390x_linux
+      /* On s390x Linux platforms the sys_ipc semtimedop call has four instead
+         of five parameters, where the timeout is passed in the third instead of
+         the fifth. */
+      PRE_REG_READ5(int, "ipc",
+                    vki_uint, call, int, first, int, second, long, third,
+                    void *, ptr);
+      ML_(generic_PRE_sys_semtimedop)( tid, ARG2, ARG5, ARG3, ARG4 );
+#else
       PRE_REG_READ6(int, "ipc",
                     vki_uint, call, int, first, int, second, int, third,
                     void *, ptr, long, fifth);
       ML_(generic_PRE_sys_semtimedop)( tid, ARG2, ARG5, ARG3, ARG6 );
+#endif
       *flags |= SfMayBlock;
       break;
    case VKI_MSGSND: