summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2011-02-21 16:58:26 +0100
committerMark Wielaard <[email protected]>2011-02-21 16:58:26 +0100
commit0a1e1b0b0ab9fa795f3ed069c61e4ec9691b6d83 (patch)
treef345ab8e379748e4372c4cd12bd39ca6f80800ba
parentca079340174bcc33a001198747062a31576b6772 (diff)
Workaround weird (buggy) self referential DW_AT_containing_type case.
https://fedorahosted.org/pipermail/elfutils-devel/2011-February/001792.html
-rw-r--r--libdw/c++/dwarf_output10
1 files changed, 9 insertions, 1 deletions
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<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);