]> sourceware.org Git - valgrind.git/commitdiff
Only process clone results in the parent thread
authorTom Hughes <tom@compton.nu>
Tue, 6 Apr 2021 21:44:36 +0000 (22:44 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 6 Apr 2021 21:44:36 +0000 (22:44 +0100)
Fixes BZ#423963

coregrind/m_syswrap/syswrap-linux.c

index 5ae4e66132d513f6f14e4e85e66ef06b1e8e93e5..c59d8ee26b3f82d15a6e2b76f7ce99d26e15a8b1 100644 (file)
@@ -940,7 +940,7 @@ PRE(sys_clone)
          ("Valgrind does not support general clone().");
    }
 
-   if (SUCCESS) {
+   if (SUCCESS && RES != 0) {
       if (ARG_FLAGS & (VKI_CLONE_PARENT_SETTID | VKI_CLONE_PIDFD))
          POST_MEM_WRITE(ARG3, sizeof(Int));
       if (ARG_FLAGS & (VKI_CLONE_CHILD_SETTID | VKI_CLONE_CHILD_CLEARTID))
This page took 0.043593 seconds and 5 git commands to generate.