pdwtags: don't fail on unhandled tags (bz 1348200)
This commit is contained in:
parent
388b5bf625
commit
f13b85e376
@ -0,0 +1,56 @@
|
|||||||
|
From be7b691756ff334705eb6faf51a196540e02e96c Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <be7b691756ff334705eb6faf51a196540e02e96c.1470234136.git.crobinso@redhat.com>
|
||||||
|
From: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||||||
|
Date: Thu, 16 Aug 2012 14:55:14 -0300
|
||||||
|
Subject: [PATCH] dwarf_loader: Don't stop processing after finding unsupported
|
||||||
|
tag
|
||||||
|
|
||||||
|
After emitting a warning that a tag is not supported __die__process_tag
|
||||||
|
was returning NULL, making die__process_unit think that the problem
|
||||||
|
was insufficient memory.
|
||||||
|
|
||||||
|
Introduce a global variable 'unsupported_tag' and return it instead,
|
||||||
|
that way die__process_unit can distinguish ENOMEM from unsupported tags.
|
||||||
|
|
||||||
|
Reported-by: Thiago Macieira <thiago.macieira@intel.com>
|
||||||
|
Tested-by: Thiago Macieira <thiago.macieira@intel.com>
|
||||||
|
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||||||
|
---
|
||||||
|
dwarf_loader.c | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dwarf_loader.c b/dwarf_loader.c
|
||||||
|
index e034237..e9e1671 100644
|
||||||
|
--- a/dwarf_loader.c
|
||||||
|
+++ b/dwarf_loader.c
|
||||||
|
@@ -1539,6 +1539,8 @@ static struct tag *die__create_new_function(Dwarf_Die *die, struct cu *cu)
|
||||||
|
return function ? &function->proto.tag : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static struct tag unsupported_tag;
|
||||||
|
+
|
||||||
|
static struct tag *__die__process_tag(Dwarf_Die *die, struct cu *cu,
|
||||||
|
int top_level, const char *fn)
|
||||||
|
{
|
||||||
|
@@ -1578,7 +1580,7 @@ static struct tag *__die__process_tag(Dwarf_Die *die, struct cu *cu,
|
||||||
|
tag = die__create_new_variable(die, cu); break;
|
||||||
|
default:
|
||||||
|
__cu__tag_not_handled(die, fn);
|
||||||
|
- tag = NULL;
|
||||||
|
+ tag = &unsupported_tag;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1595,6 +1597,9 @@ static int die__process_unit(Dwarf_Die *die, struct cu *cu)
|
||||||
|
if (tag == NULL)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
+ if (tag == &unsupported_tag)
|
||||||
|
+ continue;
|
||||||
|
+
|
||||||
|
long id = -1;
|
||||||
|
cu__add_tag(cu, tag, &id);
|
||||||
|
cu__hash(cu, tag);
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
@ -3,13 +3,15 @@
|
|||||||
|
|
||||||
Name: dwarves
|
Name: dwarves
|
||||||
Version: 1.10
|
Version: 1.10
|
||||||
Release: 9%{?dist}
|
Release: 10%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Summary: Debugging Information Manipulation Tools
|
Summary: Debugging Information Manipulation Tools
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
URL: http://acmel.wordpress.com
|
URL: http://acmel.wordpress.com
|
||||||
Source: http://fedorapeople.org/~acme/dwarves/%{name}-%{version}.tar.bz2
|
Source: http://fedorapeople.org/~acme/dwarves/%{name}-%{version}.tar.bz2
|
||||||
Patch0: dwarves-remove-dw_tag_mutable_type.patch
|
Patch0: dwarves-remove-dw_tag_mutable_type.patch
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1348200
|
||||||
|
Patch1: 0001-dwarf_loader-Don-t-stop-processing-after-finding-uns.patch
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
BuildRequires: elfutils-devel >= 0.130
|
BuildRequires: elfutils-devel >= 0.130
|
||||||
@ -51,6 +53,7 @@ Debugging information processing library development files.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -c -n %{name}-%{version}
|
%setup -q -c -n %{name}-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake .
|
%cmake .
|
||||||
@ -116,6 +119,9 @@ rm -rf %{buildroot}
|
|||||||
%{_libdir}/%{libname}_reorganize.so
|
%{_libdir}/%{libname}_reorganize.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 03 2016 Cole Robinson <crobinso@redhat.com> - 1.10-9%{?dist}
|
||||||
|
- pdwtags: don't fail on unhandled tags (bz 1348200)
|
||||||
|
|
||||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.10-9
|
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.10-9
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user