Bug 19026 - Types with same name and different size considered equivalent
authorDodji Seketeli <dodji@redhat.com>
Sat, 17 Oct 2015 15:59:20 +0000 (17:59 +0200)
committerDodji Seketeli <dodji@redhat.com>
Sat, 17 Oct 2015 15:59:20 +0000 (17:59 +0200)
This is a second attempt at fixing this bug.  The previous attempt was
on the good path, but a thinko got in the way, oops.  We are not adding
the new binary of that bug report (which got re-opened) to the test
suite because it's too big and it takes too much time and memory to
abidw to analyze it.

* src/abg-ir.cc (type_base::get_canonical_type_for): Really
compare the size of the type to be canonicalized against the size
of the *current* potential canonical type of the same name.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-ir.cc

index 8552f9e..9799cd5 100644 (file)
@@ -6238,7 +6238,7 @@ type_base::get_canonical_type_for(type_base_sptr t)
                      // Let's add one more size constraint to rule
                      // out programs that break the One Definition
                      // Rule too easily.
-                     && v[0]->get_size_in_bits() == t->get_size_in_bits())
+                     && (*it)->get_size_in_bits() == t->get_size_in_bits())
                    {
                      // Both types come from the same ABI corpus and
                      // have the same name; the One Definition Rule