From: Petr Machata Date: Wed, 16 Mar 2011 17:16:12 +0000 (+0100) Subject: Handle repeated requests for invalid abbreviation X-Git-Tag: elfutils-0.153~55^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bd1d16c3a17c227d1379df10e97f6c7865ad1440;p=thirdparty%2Felfutils.git Handle repeated requests for invalid abbreviation --- diff --git a/libdw/dwarf_tag.c b/libdw/dwarf_tag.c index 6d9090c6c..fa8b384c1 100644 --- a/libdw/dwarf_tag.c +++ b/libdw/dwarf_tag.c @@ -90,6 +90,11 @@ __libdw_findabbrev (struct Dwarf_CU *cu, unsigned int code) break; } + /* This is our second (or third, etc.) call to __libdw_findabbrev + and the code is invalid. */ + if (unlikely (abb == NULL)) + abb = DWARF_END_ABBREV; + return abb; } diff --git a/tests/Makefile.am b/tests/Makefile.am index 32a15e283..70029f7ce 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -157,7 +157,7 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfile55-32.bz2 testfile55-32.debug.bz2 \ testfile55-32.prelink.bz2 testfile55-64.bz2 \ testfile55-64.debug.bz2 testfile55-64.prelink.bz2 \ - testfile56.bz2 + testfile56.bz2 testfile57.bz2 installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \ bindir=$(DESTDIR)$(bindir) \ diff --git a/tests/run-rerequest_tag.sh b/tests/run-rerequest_tag.sh index 1636fbfe1..c61a9fd6b 100755 --- a/tests/run-rerequest_tag.sh +++ b/tests/run-rerequest_tag.sh @@ -25,8 +25,9 @@ . $srcdir/test-subr.sh -testfiles testfile56 +testfiles testfile56 testfile57 testrun ./rerequest_tag testfile56 +testrun ./rerequest_tag testfile57 exit 0 diff --git a/tests/testfile57.bz2 b/tests/testfile57.bz2 new file mode 100644 index 000000000..59dbde109 Binary files /dev/null and b/tests/testfile57.bz2 differ