libabigail/include
Dodji Seketeli 4324b82e99 Prevent infinite loops while comparing two function_type
While comparing two function types a given sub-type can itself have a
sub-type that *is* the same function_type as the one we are looking
at.  In that case, an infinite loop appears.

This patch detects those cases, similarly to what we do for class_decl
and avoids the eventual infinite loop.

	* include/abg-ir.h (class environment): Make class function_type
	be a friend of this class.
	(class function_type): Make the equality function for
	function_types be a friend of this class.
	* src/abg-ir.cc (environment::priv::fn_types_being_compared_): New
	data member.
	(function_type::priv::{mark_as_being_compared,
	unmark_as_being_compared, comparison_started}): Define new member
	functions.
	(equals): In the overload for function_types, if any of the the
	function_type being compared is already being compared, return
	early saying that the two function_types are equal.  This avoids

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-10-10 12:55:22 +02:00
..
abg-comp-filter.h Make abi{pkg}diff filter out changes about private types 2016-05-24 10:32:08 +02:00
abg-comparison.h Plug leak of diffs of member variables of class type 2016-05-22 23:20:13 +02:00
abg-config.h Add --version option to several libabigail tools 2015-11-16 12:54:10 +01:00
abg-corpus.h Drop suppressed ABI artifacts from the IR 2016-09-21 18:35:08 +02:00
abg-diff-utils.h Constify some diff-utils functor operators 2015-09-21 10:46:06 +02:00
abg-dwarf-reader.h Drop suppressed ABI artifacts from the IR 2016-09-21 18:35:08 +02:00
abg-fwd.h Add new helper functions 2016-09-21 18:35:07 +02:00
abg-hash.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-ini.h Support source_location_not_in and source_location_not_regexp suppressions 2015-09-16 20:54:40 +02:00
abg-interned-str.h Define a new interned_string_set_type typedef 2016-10-10 12:55:02 +02:00
abg-ir.h Prevent infinite loops while comparing two function_type 2016-10-10 12:55:22 +02:00
abg-libxml-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-libzip-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-reader.h Drop suppressed ABI artifacts from the IR 2016-09-21 18:35:08 +02:00
abg-sptr-utils.h Plug leak of regex_t in suppression engine 2016-05-22 23:20:13 +02:00
abg-suppression.h Drop suppressed ABI artifacts from the IR 2016-09-21 18:35:08 +02:00
abg-tools-utils.h Add ABG_ASSERT_NOT_REACHED macro 2016-07-26 20:04:23 +02:00
abg-traverse.h Canonicalize types either early or late after TU reading 2015-02-18 21:32:37 +01:00
abg-version.h.in Add --version option to several libabigail tools 2015-11-16 12:54:10 +01:00
abg-viz-common.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-viz-dot.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-viz-svg.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-workers.h Make API documentation of thread pools visible 2016-04-27 23:58:50 +02:00
abg-writer.h Update copyright years 2015-01-07 17:52:10 +01:00
Makefile.am Split suppression engine off of abg-comparison.{cc,h} 2016-05-08 12:29:57 +02:00