3.17.0-10 Add valgrind-3.17.0_start.patch

Related: #1974357
glibc pthreads updates break helgrind
This commit is contained in:
Mark Wielaard 2021-08-03 16:59:42 +02:00
parent 3e776b3f5c
commit a30c9d537c
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,26 @@
commit 200b6a5a0ea3e1e154663b0fc575bfe2becf177d
Author: Mark Wielaard <mark@klomp.org>
Date: Wed Jul 21 17:55:40 2021 +0200
m_debuginfo/debuginfo.c VG_(get_fnname_kind) _start is below main
With glibc 2.34 we might see the _start symbol as the frame that
called main instead of directly after __libc_start_main or
generic_start_main.
Fixes memcheck/tests/badjump[2], memcheck/tests/origin4-many,
helgrind/tests/tc04_free_lock, helgrind/tests/tc09_bad_unlock
and helgrind/tests/tc20_verifywrap.
diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c
index bc2578b37..e2218f266 100644
--- a/coregrind/m_debuginfo/debuginfo.c
+++ b/coregrind/m_debuginfo/debuginfo.c
@@ -2289,6 +2289,7 @@ Vg_FnNameKind VG_(get_fnname_kind) ( const HChar* name )
VG_STREQN(18, "__libc_start_main.", name) || // gcc optimization
VG_STREQ("generic_start_main", name) || // Yellow Dog doggedness
VG_STREQN(19, "generic_start_main.", name) || // gcc optimization
+ VG_STREQ("_start", name) ||
# elif defined(VGO_darwin)
// See readmacho.c for an explanation of this.
VG_STREQ("start_according_to_valgrind", name) || // Darwin, darling

View File

@ -3,7 +3,7 @@
Summary: Tool for finding memory management bugs in programs Summary: Tool for finding memory management bugs in programs
Name: %{?scl_prefix}valgrind Name: %{?scl_prefix}valgrind
Version: 3.17.0 Version: 3.17.0
Release: 9%{?dist} Release: 10%{?dist}
Epoch: 1 Epoch: 1
License: GPLv2+ License: GPLv2+
URL: http://www.valgrind.org/ URL: http://www.valgrind.org/
@ -156,6 +156,10 @@ Patch15: helgrind-and-drd-suppression-libc-and-libpthread.patch
# KDE#420906 missing syscall wrapper for clone3 (435) # KDE#420906 missing syscall wrapper for clone3 (435)
Patch16: valgrind-3.17.0-clone3.patch Patch16: valgrind-3.17.0-clone3.patch
# commit 200b6a5a0ea3e1e154663b0fc575bfe2becf177d
# m_debuginfo/debuginfo.c VG_(get_fnname_kind) _start is below main
Patch17: valgrind-3.17.0_start.patch
BuildRequires: make BuildRequires: make
BuildRequires: glibc-devel BuildRequires: glibc-devel
@ -311,6 +315,7 @@ touch memcheck/tests/s390x/vistr.stdout.exp
%patch14 -p1 %patch14 -p1
%patch15 -p1 %patch15 -p1
%patch16 -p1 %patch16 -p1
%patch17 -p1
%build %build
# LTO triggers undefined symbols in valgrind. Valgrind has a --enable-lto # LTO triggers undefined symbols in valgrind. Valgrind has a --enable-lto
@ -536,6 +541,9 @@ fi
%endif %endif
%changelog %changelog
* Tue Aug 3 2021 Mark Wielaard <mjw@redhat.com> - 3.17.0-10
- Add valgrind-3.17.0_start.patch
* Wed Jul 21 2021 Mark Wielaard <mjw@redhat.com> - 3.17.0-9 * Wed Jul 21 2021 Mark Wielaard <mjw@redhat.com> - 3.17.0-9
- Add valgrind-3.17.0-clone3.patch - Add valgrind-3.17.0-clone3.patch