Don't crash on classes that differ in their virtual member fn count

When comparing classes that differ in their number of virtual member
functions, it can happen that we crash because we should have got out
earlier.

This patch fixes that.  That problem happens on the test provided in
PR libabigail/17948 -- which is too big to be included in the test
suite.

	* src/abg-ir.cc (equals): In the overload for class_decl, when we
	detect that the virtual member function counts are different, get
	out, even when we are being asked about the kind of the change.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2017-09-18 16:18:26 +02:00
parent 445567c42f
commit f344f92b25

View File

@ -17653,8 +17653,7 @@ equals(const class_decl& l, const class_decl& r, change_kind* k)
result = false;
if (k)
*k |= SUBTYPE_CHANGE_KIND;
else
RETURN(result);
RETURN(result);
}
const class_decl::member_functions& second_vfns =