From: Dodji Seketeli Date: Mon, 18 Sep 2017 14:18:26 +0000 (+0200) Subject: Don't crash on classes that differ in their virtual member fn count X-Git-Tag: libabigail-1.0~34 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=f344f92b255283107c29931313314f161a1bfa53;p=libabigail.git 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 --- diff --git a/src/abg-ir.cc b/src/abg-ir.cc index b06bf878..1a2d637d 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -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 =