3.14.0-10 - Add valgrind-3.14.0-subrange_type-count.patch

This commit is contained in:
Mark Wielaard 2019-01-11 22:13:01 +01:00
parent 607b6fc561
commit fa24ab78ec
2 changed files with 50 additions and 2 deletions

View File

@ -0,0 +1,43 @@
commit 3528f84037833a799538a2fc48ed30dd09c77b5e
Author: Mark Wielaard <mark@klomp.org>
Date: Fri Jan 11 21:52:26 2019 +0100
readdwarf3.c (parse_type_DIE): Accept DW_TAG_subrange_type with DW_AT_count
GCC9 generates a subrange_type with a lower_bound and count, but no
upper_bound attribute. This simply means the upper bound is lower
plus count.
diff --git a/coregrind/m_debuginfo/readdwarf3.c b/coregrind/m_debuginfo/readdwarf3.c
index e9a3816..1b49ba4 100644
--- a/coregrind/m_debuginfo/readdwarf3.c
+++ b/coregrind/m_debuginfo/readdwarf3.c
@@ -3610,6 +3610,7 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents,
Bool have_count = False;
Long lower = 0;
Long upper = 0;
+ Long count = 0;
switch (parser->language) {
case 'C': have_lower = True; lower = 0; break;
@@ -3641,7 +3642,7 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents,
have_upper = True;
}
if (attr == DW_AT_count && cts.szB > 0) {
- /*count = (Long)cts.u.val;*/
+ count = (Long)cts.u.val;
have_count = True;
}
}
@@ -3680,6 +3681,11 @@ static void parse_type_DIE ( /*MOD*/XArray* /* of TyEnt */ tyents,
boundE.Te.Bound.knownU = False;
boundE.Te.Bound.boundL = 0;
boundE.Te.Bound.boundU = 0;
+ } else if (have_lower && (!have_upper) && (have_count)) {
+ boundE.Te.Bound.knownL = True;
+ boundE.Te.Bound.knownU = True;
+ boundE.Te.Bound.boundL = lower;
+ boundE.Te.Bound.boundU = lower + count;
} else {
/* FIXME: handle more cases */
goto_bad_DIE;

View File

@ -3,7 +3,7 @@
Summary: Tool for finding memory management bugs in programs
Name: %{?scl_prefix}valgrind
Version: 3.14.0
Release: 9%{?dist}
Release: 10%{?dist}
Epoch: 1
License: GPLv2+
URL: http://www.valgrind.org/
@ -170,6 +170,9 @@ Patch33: valgrind-3.14.0-power9-addex.patch
# KDE#402480 Do not use %rsp in clobber list
Patch34: valgrind-3.14.0-rsp-clobber.patch
# commit 3528f8 Accept DW_TAG_subrange_type with DW_AT_count
Patch35: valgrind-3.14.0-subrange_type-count.patch
%if %{build_multilib}
# Ensure glibc{,-devel} is installed for both multilib arches
@ -337,6 +340,7 @@ Valgrind User Manual for details.
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
%build
CC=gcc
@ -571,8 +575,9 @@ fi
%endif
%changelog
* Wed Jan 9 2019 Mark Wielaard <mjw@fedoraproject.org>
* Wed Jan 9 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-10
- Add valgrind-3.14.0-rsp-clobber.patch
- Add valgrind-3.14.0-subrange_type-count.patch
* Mon Dec 31 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.14.0-9
- Add valgrind-3.14.0-vbit-test-sec.patch