libabigail/tests/data/test-read-write
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
..
test0.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test1.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test2.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test3.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test4.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test5.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test6.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test7.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test8.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test9.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test10.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test11.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test12.xml Fix template parameter hashing: make it know about enclosing template 2014-11-07 12:16:34 +01:00
test13.xml Fix template parameter hashing: make it know about enclosing template 2014-11-07 12:16:34 +01:00
test14.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test15.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test16.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test17.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test18.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test19.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test20.xml Get rid of class_decl::data_member 2014-03-19 21:18:38 +01:00
test21.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test22.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test23.xml Support new 'abi-corpus' native XML format (.abi) 2014-01-07 14:12:26 +01:00
test24.xml Handle C99 restrict qualifier and DWARFv3 DW_TAG_restrict_type. 2014-06-23 15:55:37 +02:00
test25.xml Support C and C++ array type. 2014-08-22 13:07:41 +02:00
test26.xml Fix a crash while writing symbol information 2014-12-07 17:25:26 +01:00