From: Mark Wielaard Date: Thu, 17 Mar 2011 11:46:06 +0000 (+0100) Subject: Workaround all self referential ref values, not just DW_AT_containing_type. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f793650c0cd602569ce59e16cc3d747c262993b2;p=thirdparty%2Felfutils.git Workaround all self referential ref values, not just DW_AT_containing_type. --- diff --git a/libdw/c++/dwarf_output b/libdw/c++/dwarf_output index aeb192c4d..aab1598b1 100644 --- a/libdw/c++/dwarf_output +++ b/libdw/c++/dwarf_output @@ -1402,10 +1402,11 @@ namespace elfutils = dynamic_cast (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);