]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Workaround weird (buggy) self referential DW_AT_containing_type case.
authorMark Wielaard <mjw@redhat.com>
Mon, 21 Feb 2011 15:58:26 +0000 (16:58 +0100)
committerMark Wielaard <mjw@redhat.com>
Wed, 16 Mar 2011 14:05:27 +0000 (15:05 +0100)
https://fedorahosted.org/pipermail/elfutils-devel/2011-February/001792.html

libdw/c++/dwarf_output

index 1f756f69d976bfcbd5eda1ef5270d4de36b02600..aeb192c4d7dac3991623be2824ba4f7753867378 100644 (file)
@@ -1401,7 +1401,15 @@ namespace elfutils
            const entry *ref
              = dynamic_cast<const entry *> (it->second._m_value);
            if (ref != NULL)
-             attr_rhashes ^= ref->get_reference_hash (stack);
+             {
+               // Workaround weird case (bug?)
+               // https://fedorahosted.org/pipermail/elfutils-devel/2011-February/001792.html
+               if (it->first == DW_AT_containing_type
+                   && ref->_m_pending == this)
+                 continue;
+               else
+                 attr_rhashes ^= ref->get_reference_hash (stack);
+             }
           }
        subr::hash_combine (rhash, attr_rhashes);