libabigail/tests/data
Dodji Seketeli c0a31b48c7 Fix a crash while writing symbol information
While working on something else, I noticed that the abilint tool would
crash when trying to write information relative to some symbol
information.  It turned out that invoking corpus::get_fun_symbol_map()
or corpus::get_var_symbol_map() on a corpus that has an empty function
(or variable) symbol map yields a crash.  This patch fixes that.

To test the fix I had to extend the test-read-write.cc test harness to
teach it to load corpus files too; up to now it was only loading
simple translation unit files (named Binary Instrumentation files).  I
then created a native xml corpus file using the abidw tool on a simple
shared library I created.  That corpus file does have an empty
variable symbol section which triggers the crash on a non-fixed tree.

	* src/abg-corpus.cc (corpus::{get_fun_symbol_map_sptr,
	get_var_symbol_map_sptr}): Make sure the symbol map is always
	constructed, even if it's empty.
	* tests/data/test-read-write/test26.xml: New test input data.
	* tests/test-read-write.cc (in_out_spec): Add this new test input
	data to the list of input data to run the harness on.
	(main): Support reading and writing corpus files alongside
	translation unit files that we were handling already.
	* tests/data/Makefile.am: Add the new test input data to source
	distribution.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-12-07 17:25:26 +01:00
..
test-abicompat Initial implementation of the abicompat tool 2014-12-05 15:43:31 +01:00
test-abidiff Sort reported changed declarations & types in a given scope 2014-11-08 11:32:58 +01:00
test-alt-dwarf-file Make the alt dwarf debug file *not* be a symlink 2014-11-19 16:50:48 +01:00
test-core-diff Fix further reaching reverse path calculation in core diff algo 2014-02-10 15:51:09 +01:00
test-diff-dwarf Spit and polish variables presentation in diff report 2014-11-01 12:15:14 +01:00
test-diff-filter Spit and polish variables presentation in diff report 2014-11-01 12:15:14 +01:00
test-diff-suppr Sort reported changed declarations & types in a given scope 2014-11-08 11:32:58 +01:00
test-lookup-syms Re-build a test input file with debug info 2014-05-14 11:32:06 +02:00
test-read-dwarf Sort elf symbols before serializing them 2014-11-08 11:22:43 +01:00
test-read-write Fix a crash while writing symbol information 2014-12-07 17:25:26 +01:00
test-write-read-archive Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
Makefile.am Fix a crash while writing symbol information 2014-12-07 17:25:26 +01:00