3.18.1-5 - Add valgrind-3.18.1-demangle-namespace.patch

This commit is contained in:
Mark Wielaard 2021-11-22 14:45:14 +01:00
parent 0e37cf264d
commit b8d4e42b21
2 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,35 @@
commit 542447d4708d4418a08e678dcf467af92b90b7ad
Author: Mark Wielaard <mark@klomp.org>
Date: Mon Nov 22 13:07:59 2021 +0100
readdwarf3.c (parse_inl_DIE) inlined_subroutine can appear in namespaces
This was broken by commit 75e3ef0f3 "readdwarf3: Skip units without
addresses when looking for inlined functions". Specifically by this
part: "Also use skip_DIE instead of read_DIE when not parsing
(skipping) children"
rustc puts concrete function instances in namespaces (which is
allowed in DWARF since there is no strict separation between type
declarations and program scope entries in a DIE tree), the inline
parser didn't expect this and so skipped any DIE under a namespace
entry. This wasn't an issue before because "skipping" a DIE tree was
done by reading it, so it wasn't actually skipped. But now that we
really skip the DIE (sub)tree (which is faster than actually parsing
it) some entries were missed in the rustc case.
https://bugs.kde.org/show_bug.cgi?id=445668
diff --git a/coregrind/m_debuginfo/readdwarf3.c b/coregrind/m_debuginfo/readdwarf3.c
index 18eecea9f..5489f8d13 100644
--- a/coregrind/m_debuginfo/readdwarf3.c
+++ b/coregrind/m_debuginfo/readdwarf3.c
@@ -3358,7 +3358,7 @@ static Bool parse_inl_DIE (
// might maybe contain a DW_TAG_inlined_subroutine:
Bool ret = (unit_has_addrs
|| dtag == DW_TAG_lexical_block || dtag == DW_TAG_subprogram
- || dtag == DW_TAG_inlined_subroutine);
+ || dtag == DW_TAG_inlined_subroutine || dtag == DW_TAG_namespace);
return ret;
bad_DIE:

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.18.1 Version: 3.18.1
Release: 4%{?dist} Release: 5%{?dist}
Epoch: 1 Epoch: 1
License: GPLv2+ License: GPLv2+
URL: http://www.valgrind.org/ URL: http://www.valgrind.org/
@ -125,6 +125,9 @@ Patch16: valgrind-3.18.1-amd64-more-spec-rules.patch
# "mutex is locked simultaneously by two threads" warning # "mutex is locked simultaneously by two threads" warning
Patch17: valgrind-3.18.1-condvar.patch Patch17: valgrind-3.18.1-condvar.patch
# KDE#445668 Inline stack frame generation is broken for Rust binaries
Patch18: valgrind-3.18.1-demangle-namespace.patch
BuildRequires: make BuildRequires: make
BuildRequires: glibc-devel BuildRequires: glibc-devel
@ -274,6 +277,7 @@ Valgrind User Manual for details.
%patch15 -p1 %patch15 -p1
%patch16 -p1 %patch16 -p1
%patch17 -p1 %patch17 -p1
%patch18 -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
@ -503,6 +507,9 @@ fi
%endif %endif
%changelog %changelog
* Mon Nov 22 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.18.1-5
- Add valgrind-3.18.1-demangle-namespace.patch
* Fri Nov 19 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.18.1-4 * Fri Nov 19 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.18.1-4
- Add valgrind-3.18.1-condvar.patch - Add valgrind-3.18.1-condvar.patch