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