]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix the system call wrapper for the clone system call (s390x).
authorFlorian Krohm <florian@eich-krohm.de>
Tue, 13 Sep 2011 14:57:35 +0000 (14:57 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Tue, 13 Sep 2011 14:57:35 +0000 (14:57 +0000)
Fixes #281883. Patch by Christian Borntraeger (borntraeger@de.ibm.com).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12033

NEWS
coregrind/m_syswrap/syswrap-s390x-linux.c

diff --git a/NEWS b/NEWS
index e0ca7303bfa626b92b52993a8c49fa30159ba37c..ba68895ce2fc2347f27c62150ee7a60e8daf648e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -275,6 +275,8 @@ fixed
 
 279027 - s390x: Provide support for CLCL and MVCL instructions
 
+281883 - s390x: Fix system call wrapper for "clone".
+
 
 Release 3.6.1 (16 February 2011)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
index 0049f7dfc46bad820ce369460dbd06025bc03f44..4880226416c4343fb4964b36666852f7e276ff20 100644 (file)
@@ -938,13 +938,13 @@ PRE(sys_clone)
    UInt cloneflags;
 
    PRINT("sys_clone ( %lx, %#lx, %#lx, %#lx, %#lx )",ARG1,ARG2,ARG3,ARG4, ARG5);
-   PRE_REG_READ4(int, "clone",
+   PRE_REG_READ2(int, "clone",
                  void *,        child_stack,
-                 unsigned long, flags,
-                 int *,         parent_tidptr,
-                 int *,         child_tidptr);
+                 unsigned long, flags);
 
    if (ARG2 & VKI_CLONE_PARENT_SETTID) {
+      if (VG_(tdict).track_pre_reg_read)
+         PRA3("clone(parent_tidptr)", int *, parent_tidptr);
       PRE_MEM_WRITE("clone(parent_tidptr)", ARG3, sizeof(Int));
       if (!VG_(am_is_valid_for_client)(ARG3, sizeof(Int),
                                              VKI_PROT_WRITE)) {
@@ -953,6 +953,8 @@ PRE(sys_clone)
       }
    }
    if (ARG2 & (VKI_CLONE_CHILD_SETTID | VKI_CLONE_CHILD_CLEARTID)) {
+      if (VG_(tdict).track_pre_reg_read)
+         PRA4("clone(child_tidptr)", int *, child_tidptr);
       PRE_MEM_WRITE("clone(child_tidptr)", ARG4, sizeof(Int));
       if (!VG_(am_is_valid_for_client)(ARG4, sizeof(Int),
                                              VKI_PROT_WRITE)) {