From: Tom Hughes Date: Tue, 6 Apr 2021 21:44:36 +0000 (+0100) Subject: Only process clone results in the parent thread X-Git-Tag: VALGRIND_3_18_0~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e08a82991a9b9dc87c13f2b89273f25f97d14baf;p=thirdparty%2Fvalgrind.git Only process clone results in the parent thread Fixes BZ#423963 --- diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 5ae4e66132..c59d8ee26b 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -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))