Blame SOURCES/valgrind-3.17.0-clone-parent-res.patch

172105
commit e08a82991a9b9dc87c13f2b89273f25f97d14baf
172105
Author: Tom Hughes <tom@compton.nu>
172105
Date:   Tue Apr 6 22:44:36 2021 +0100
172105
172105
    Only process clone results in the parent thread
172105
    
172105
    Fixes BZ#423963
172105
172105
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
172105
index 5ae4e6613..c59d8ee26 100644
172105
--- a/coregrind/m_syswrap/syswrap-linux.c
172105
+++ b/coregrind/m_syswrap/syswrap-linux.c
172105
@@ -940,7 +940,7 @@ PRE(sys_clone)
172105
          ("Valgrind does not support general clone().");
172105
    }
172105
 
172105
-   if (SUCCESS) {
172105
+   if (SUCCESS && RES != 0) {
172105
       if (ARG_FLAGS & (VKI_CLONE_PARENT_SETTID | VKI_CLONE_PIDFD))
172105
          POST_MEM_WRITE(ARG3, sizeof(Int));
172105
       if (ARG_FLAGS & (VKI_CLONE_CHILD_SETTID | VKI_CLONE_CHILD_CLEARTID))