From 4dc277807ebb32975cf9c16f21a65296eb3e1d8b Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 3 Jun 2021 11:34:03 +0200 Subject: [PATCH] Add valgrind-3.17.0-clone-parent-res.patch --- valgrind-3.17.0-clone-parent-res.patch | 21 +++++++++++++++++++++ valgrind.spec | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 valgrind-3.17.0-clone-parent-res.patch diff --git a/valgrind-3.17.0-clone-parent-res.patch b/valgrind-3.17.0-clone-parent-res.patch new file mode 100644 index 0000000..8d03cea --- /dev/null +++ b/valgrind-3.17.0-clone-parent-res.patch @@ -0,0 +1,21 @@ +commit e08a82991a9b9dc87c13f2b89273f25f97d14baf +Author: Tom Hughes +Date: Tue Apr 6 22:44:36 2021 +0100 + + 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 5ae4e6613..c59d8ee26 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)) diff --git a/valgrind.spec b/valgrind.spec index a351b65..57ebbb4 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -113,6 +113,9 @@ Patch8: valgrind-3.17.0-s390_insn_as_string.patch # KDE#435908 Don't look for separate debuginfo if image already has .debug_info Patch9: valgrind-3.17.0-debuginfod.patch +# KDE#423963 Only process clone results in the parent thread +Patch10: valgrind-3.17.0-clone-parent-res.patch + BuildRequires: make BuildRequires: glibc-devel @@ -259,6 +262,7 @@ Valgrind User Manual for details. %patch8 -p1 %patch9 -p1 +%patch10 -p1 %build # LTO triggers undefined symbols in valgrind. Valgrind has a --enable-lto @@ -487,6 +491,7 @@ fi * Thu Jun 3 2021 Mark Wielaard - Add valgrind-3.17.0-s390_insn_as_string.patch - Add valgrind-3.17.0-debuginfod.patch +- Add valgrind-3.17.0-clone-parent-res.patch * Tue May 4 2021 Mark Wielaard - 3.17.0-3 - Add valgrind-3.17.0-ppc64-isa-3.1{,tests}.patch