]> sourceware.org Git - libabigail.git/commitdiff
Don't crash on classes that differ in their virtual member fn count
authorDodji Seketeli <dodji@redhat.com>
Mon, 18 Sep 2017 14:18:26 +0000 (16:18 +0200)
committerDodji Seketeli <dodji@redhat.com>
Mon, 18 Sep 2017 15:45:30 +0000 (17:45 +0200)
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>
src/abg-ir.cc

index b06bf878d0a4f2147e9565615aacc9fa9b45813e..1a2d637dc3df518435c13d063b34a96a7d0c2bf5 100644 (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 =
This page took 0.064122 seconds and 5 git commands to generate.