From 0a1e1b0b0ab9fa795f3ed069c61e4ec9691b6d83 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 21 Feb 2011 16:58:26 +0100 Subject: Workaround weird (buggy) self referential DW_AT_containing_type case. https://fedorahosted.org/pipermail/elfutils-devel/2011-February/001792.html --- libdw/c++/dwarf_output | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libdw/c++/dwarf_output b/libdw/c++/dwarf_output index d2cc7f6d..0ee62dae 100644 --- a/libdw/c++/dwarf_output +++ b/libdw/c++/dwarf_output @@ -1401,7 +1401,15 @@ namespace elfutils const entry *ref = dynamic_cast (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); -- cgit v1.2.3