]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Workaround all self referential ref values, not just DW_AT_containing_type.
authorMark Wielaard <mjw@redhat.com>
Thu, 17 Mar 2011 11:46:06 +0000 (12:46 +0100)
committerMark Wielaard <mjw@redhat.com>
Thu, 17 Mar 2011 12:22:34 +0000 (13:22 +0100)
libdw/c++/dwarf_output

index aeb192c4d7dac3991623be2824ba4f7753867378..aab1598b13c36e30f878dad3ec9c7557a8b77985 100644 (file)
@@ -1402,10 +1402,11 @@ namespace elfutils
              = dynamic_cast<const entry *> (it->second._m_value);
            if (ref != NULL)
              {
-               // 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)
+               // Workaround weird cases of self-referential DIE.
+               // This really is a bug in the producer and dwarflint
+               // should warn about it. But it is easy to work around
+               // so just do it for now, by ignoring such values.
+               if (ref->_m_pending == this)
                  continue;
                else
                  attr_rhashes ^= ref->get_reference_hash (stack);