From: Florian Krohm Date: Tue, 13 Sep 2011 14:57:35 +0000 (+0000) Subject: Fix the system call wrapper for the clone system call (s390x). X-Git-Tag: svn/VALGRIND_3_7_0~204 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58034de488a38705bfce71794b03ee92f3b2223e;p=thirdparty%2Fvalgrind.git Fix the system call wrapper for the clone system call (s390x). Fixes #281883. Patch by Christian Borntraeger (borntraeger@de.ibm.com). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12033 --- diff --git a/NEWS b/NEWS index e0ca7303bf..ba68895ce2 100644 --- 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) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c index 0049f7dfc4..4880226416 100644 --- a/coregrind/m_syswrap/syswrap-s390x-linux.c +++ b/coregrind/m_syswrap/syswrap-s390x-linux.c @@ -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)) {