libabigail/tests
Dodji Seketeli 066ebbdf0e Bug 19204 - libabigail aborts on DWARF referencing non-existing DIE
In this bug the DWARF reader tries to get the parent of a DIE
(referred-to by its offset) which is not defined in the debug info.
The DIE is not defined, but it's referred-to by another DIE of the
debug info.  This definitely looks like a faulty DWARF.

The DWARF reader aborts because, obviously, it cannot get the parent
DIE of a DIE that is not defined.

This patch changes the behaviour of the DWARF reader in this case.
Rather than aborting, the DWARF reader just drops the DIE (which
refers to a non-existing DIE) on the floor.  It thus do not abort on
such faulty DWARF anymore.

	* src/abg-dwarf-reader.cc (get_parent_die): If we couldn't find
	the parent of a given DIE, return false, do not abort.  Also,
	assert that if we don't find the parent of a DIE in the main debug
	info, we don't find it in the alternate debug info either (and
	vice versa).  This is because I'd like to abort on cases where we
	look for a DIE in the wrong debug info; those cases are likely to
	be hint that the DWARF reader is doing something wrong which ought
	to be investigated and fixed.
	(get_scope_for_die): If we couldn't get the parent of the DIE,
	then return a nil scope.
	* tests/data/test-types-stability/pr19204-libtcmalloc.so.4.2.6-xlc:
	New test binary input.
	* tests/data/Makefile.am: Add the new binary test input to the
	source distribution.
	* tests/test-types-stability.cc (elf_paths): Account for the new
	binary input.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-01-21 10:48:32 +01:00
..
data Bug 19204 - libabigail aborts on DWARF referencing non-existing DIE 2016-01-21 10:48:32 +01:00
Makefile.am Sort the tests run in tests/ by running the slowest ones first 2016-01-18 18:23:18 +01:00
print-diff-tree.cc Introduce the concept of environment 2015-09-07 23:35:29 +02:00
runtestcanonicalizetypes.sh.in Fix the new regression test for type canonicalizing 2015-02-19 11:44:19 +01:00
test-abicompat.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-abidiff.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-alt-dwarf-file.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-core-diff.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-diff2.cc Update copyright years 2015-01-07 17:52:10 +01:00
test-diff-dwarf-abixml.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-diff-dwarf.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-diff-filter.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-diff-pkg.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-diff-suppr.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-dot.cc Correct DOT merge. 2013-07-23 23:13:55 +02:00
test-ir-walker.cc Introduce the concept of environment 2015-09-07 23:35:29 +02:00
test-lookup-syms.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-read-dwarf.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-read-write.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-svg.cc Add svg generation. 2013-07-23 23:13:54 +02:00
test-types-stability.cc Bug 19204 - libabigail aborts on DWARF referencing non-existing DIE 2016-01-21 10:48:32 +01:00
test-utils.cc Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-utils.h Use worker threads pattern to speed up some tests 2016-01-18 18:23:18 +01:00
test-write-read-archive.cc Fix archive writing support 2015-04-24 19:59:19 +02:00
update-test-read-dwarf-output.py Add a script to update the reference output of runtestreaddwarf 2015-10-17 16:20:58 +02:00