libabigail/tests/data/test-abidiff/test-PR18791-report0.txt
Dodji Seketeli 60cdabd931 Bug 18893 - type degradation from dwarf to abixml on libGLU.so
abidiff-ing libGLU.so against the result of 'abidw libGLU.so' does not
yield the empty set.  This is because hashing certain types when they
are read (de-serialized) from DWARF doesn't give the same result as
when they are de-serialized from abixml.  I call this type
degradation.  And it leads to spurious comparison differences.

This is due to several issues.

  1/ The logical link between a class declaration and its definition
  -- that is built when reading types from DWARF is not preserved in
  abixml.  So, for example, when a class S refers to itself via a
  pointer to its declaration, that type might hash differently when
  read from DWARF and when read from abixml.  When read from abixml
  it's a pointer to S itself.  But then that 'self' can be a copy of S
  that is defined in another file because abixml doesn't enforce the
  One Definition Rule from C++ either.

  2/ As the result of hashing is kept in a cache for var_decl and
  function_decl, hashing those decl before their types are completely
  built caches a value that becomes wrong when their type become
  completely built.

  3/ In DWARF, a class which has a virtual member function can still
  be considered as being declaration-only.  And its definition can
  come later in the DWARF info.  Our DWARF reader removes the
  "declaration-only" flag from a class as soon as it sees virtual
  member functions in that class; that makes us consider that class as
  a definition.  And then later when we read the real definition of
  the class we have two classes of the same name, with different
  layouts/size in the system.  This leads to spurious comparison
  differences too.

This patch addresses issues 1, 2 and 3.

	* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Do not
	consider that virtual member functions disqualify a class from
	being declaration-only.
	* src/abg-hash.cc (var_decl:#️⃣:operator()): Do not cache the
	result of hashing before we are done building the type of the
	var_decl.
	(function_decl:#️⃣:operator()): Likewise, do not cache the
	result of hashing before we are done building the type of the
	function_decl.
	* src/abg-reader.cc (build_class_decl): Build the link between a
	class declaration and its definition.  If there are several
	definitions of a class in the corpus, keep just one.
	* src/abg-writer.cc (write_class_is_declaration_only): Emit the
	link between a class declaration and its definition.
	(write_class_decl): Emit a class declaration even if it has a
	definition.  The definition is going to be emitted
	separately.
	* tests/data/test-read-dwarf/test14-pr18893.so: New binary test
	input.
	* tests/data/test-read-dwarf/test14-pr18893.so.abi: New test
	reference output.
	* tests/data/Makefile.am: Add the new test input files to source
	distribution.
	* tests/test-read-dwarf.cc (in_out_specs): Run the new tests.
	* tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
	* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
	* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
	* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
	* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
	* tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-08-30 17:11:36 +02:00

167 lines
11 KiB
Plaintext

Functions changes summary: 1 Removed, 13 Changed, 1 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
1 Removed function:
'method void std::_List_base<sigc::slot_base, std::allocator<sigc::slot_base> >::_M_clear()'
1 Added function:
'method void std::__cxx11::_List_base<sigc::slot_base, std::allocator<sigc::slot_base> >::_M_clear()'
13 functions with some indirect sub-type change:
[C]'method sigc::connection::connection(const sigc::connection&)' has some indirect sub-type changes:
parameter 1 of type 'const sigc::connection&' has sub-type changes:
in referenced type 'const sigc::connection':
in unqualified underlying type 'struct sigc::connection':
1 data member change:
type of 'sigc::slot_base* sigc::connection::slot_' changed:
in pointed to type 'class sigc::slot_base':
1 data member change:
type of 'sigc::slot_base::rep_type* sigc::slot_base::rep_' changed:
in pointed to type 'typedef sigc::slot_base::rep_type':
underlying type 'struct sigc::internal::slot_rep' changed:
1 base class change:
'struct sigc::trackable' changed:
1 data member change:
type of 'sigc::internal::trackable_callback_list* sigc::trackable::callback_list_' changed:
in pointed to type 'struct sigc::internal::trackable_callback_list':
type size changed from 192 to 256 bits
2 data member changes:
type of 'sigc::internal::trackable_callback_list::callback_list sigc::internal::trackable_callback_list::callbacks_' changed:
underlying type 'class std::list<sigc::internal::trackable_callback, std::allocator<sigc::internal::trackable_callback> >' changed:
type name changed from 'std::list<sigc::internal::trackable_callback, std::allocator<sigc::internal::trackable_callback> >' to 'std::__cxx11::list<sigc::internal::trackable_callback, std::allocator<sigc::internal::trackable_callback> >'
type size changed from 128 to 192 bits
1 base class deletion:
class std::_List_base<sigc::internal::trackable_callback, std::allocator<sigc::internal::trackable_callback> >
1 base class insertion:
class std::__cxx11::_List_base<sigc::internal::trackable_callback, std::allocator<sigc::internal::trackable_callback> >
'bool sigc::internal::trackable_callback_list::clearing_' offset changed from 128 to 192 (in bits)
[C]'method sigc::connection::connection(sigc::slot_base&)' has some indirect sub-type changes:
parameter 1 of type 'sigc::slot_base&' has sub-type changes:
referenced type 'class sigc::slot_base' changed, as reported earlier
[C]'method sigc::connection& sigc::connection::operator=(const sigc::connection&)' has some indirect sub-type changes:
return type changed:
referenced type 'struct sigc::connection' changed, as reported earlier
parameter 1 of type 'const sigc::connection&' has sub-type changes:
in referenced type 'const sigc::connection':
unqualified underlying type 'struct sigc::connection' changed, as reported earlier
[C]'method void sigc::connection::set_slot(sigc::slot_base*)' has some indirect sub-type changes:
parameter 1 of type 'sigc::slot_base*' has sub-type changes:
pointed to type 'class sigc::slot_base' changed, as reported earlier
[C]'method sigc::internal::signal_impl::iterator_type sigc::internal::signal_impl::connect(const sigc::slot_base&)' has some indirect sub-type changes:
return type changed:
underlying type 'typedef std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator' changed:
typedef name changed from std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator to std::__cxx11::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator
parameter 1 of type 'const sigc::slot_base&' has sub-type changes:
in referenced type 'const sigc::slot_base':
unqualified underlying type 'class sigc::slot_base' changed, as reported earlier
[C]'method sigc::internal::signal_impl::iterator_type sigc::internal::signal_impl::erase(sigc::internal::signal_impl::iterator_type)' has some indirect sub-type changes:
return type changed:
underlying type 'typedef std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator' changed:
typedef name changed from std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator to std::__cxx11::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator
parameter 1 of type 'typedef sigc::internal::signal_impl::iterator_type' changed:
underlying type 'typedef std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator' changed:
typedef name changed from std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator to std::__cxx11::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator
[C]'method sigc::internal::signal_impl::iterator_type sigc::internal::signal_impl::insert(sigc::internal::signal_impl::iterator_type, const sigc::slot_base&)' has some indirect sub-type changes:
return type changed:
underlying type 'typedef std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator' changed:
typedef name changed from std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator to std::__cxx11::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator
parameter 1 of type 'typedef sigc::internal::signal_impl::iterator_type' changed:
underlying type 'typedef std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator' changed:
typedef name changed from std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator to std::__cxx11::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator
parameter 2 of type 'const sigc::slot_base&' has sub-type changes:
in referenced type 'const sigc::slot_base':
unqualified underlying type 'class sigc::slot_base' changed, as reported earlier
[C]'method sigc::signal_base::iterator_type sigc::signal_base::connect(const sigc::slot_base&)' has some indirect sub-type changes:
return type changed:
underlying type 'typedef sigc::internal::signal_impl::iterator_type' changed:
underlying type 'typedef std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator' changed:
typedef name changed from std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator to std::__cxx11::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator
parameter 1 of type 'const sigc::slot_base&' has sub-type changes:
in referenced type 'const sigc::slot_base':
unqualified underlying type 'class sigc::slot_base' changed, as reported earlier
[C]'method sigc::signal_base::iterator_type sigc::signal_base::erase(sigc::signal_base::iterator_type)' has some indirect sub-type changes:
return type changed:
underlying type 'typedef sigc::internal::signal_impl::iterator_type' changed:
underlying type 'typedef std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator' changed:
typedef name changed from std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator to std::__cxx11::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator
parameter 1 of type 'typedef sigc::signal_base::iterator_type' changed:
underlying type 'typedef sigc::internal::signal_impl::iterator_type' changed:
underlying type 'typedef std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator' changed:
typedef name changed from std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator to std::__cxx11::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator
[C]'method sigc::internal::signal_impl* sigc::signal_base::impl()' has some indirect sub-type changes:
return type changed:
in pointed to type 'struct sigc::internal::signal_impl':
type size changed from 192 to 256 bits
1 data member change:
type of 'std::list<sigc::slot_base, std::allocator<sigc::slot_base> > sigc::internal::signal_impl::slots_' changed:
type name changed from 'std::list<sigc::slot_base, std::allocator<sigc::slot_base> >' to 'std::__cxx11::list<sigc::slot_base, std::allocator<sigc::slot_base> >'
type size changed from 128 to 192 bits
1 base class deletion:
class std::_List_base<sigc::slot_base, std::allocator<sigc::slot_base> >
1 base class insertion:
class std::__cxx11::_List_base<sigc::slot_base, std::allocator<sigc::slot_base> >
[C]'method sigc::signal_base::iterator_type sigc::signal_base::insert(sigc::signal_base::iterator_type, const sigc::slot_base&)' has some indirect sub-type changes:
return type changed:
underlying type 'typedef sigc::internal::signal_impl::iterator_type' changed:
underlying type 'typedef std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator' changed:
typedef name changed from std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator to std::__cxx11::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator
parameter 1 of type 'typedef sigc::signal_base::iterator_type' changed:
underlying type 'typedef sigc::internal::signal_impl::iterator_type' changed:
underlying type 'typedef std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator' changed:
typedef name changed from std::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator to std::__cxx11::list<sigc::slot_base, std::allocator<sigc::slot_base> >::iterator
parameter 2 of type 'const sigc::slot_base&' has sub-type changes:
in referenced type 'const sigc::slot_base':
unqualified underlying type 'class sigc::slot_base' changed, as reported earlier
[C]'method sigc::signal_base& sigc::signal_base::operator=(const sigc::signal_base&)' has some indirect sub-type changes:
return type changed:
in referenced type 'struct sigc::signal_base':
1 base class change:
'struct sigc::trackable' changed:
details were reported earlier
1 data member change:
type of 'sigc::internal::signal_impl* sigc::signal_base::impl_' changed:
pointed to type 'struct sigc::internal::signal_impl' changed, as reported earlier
parameter 1 of type 'const sigc::signal_base&' has sub-type changes:
in referenced type 'const sigc::signal_base':
unqualified underlying type 'struct sigc::signal_base' changed, as reported earlier
[C]'method sigc::signal_base::signal_base(const sigc::signal_base&)' has some indirect sub-type changes:
parameter 1 of type 'const sigc::signal_base&' has sub-type changes:
in referenced type 'const sigc::signal_base':
unqualified underlying type 'struct sigc::signal_base' changed, as reported earlier