libdw: Break long or circular DIE ref chains in dwarf_[has]attr_integrate.
authorMark Wielaard <mark@klomp.org>
Sun, 10 Jun 2018 14:59:12 +0000 (16:59 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 11 Jun 2018 15:26:02 +0000 (17:26 +0200)
commit340ce2c433b8033e57c0c23e9087ea15a349fd3e
treeac5be8c563ab386a1303018480944a4e9011860c
parent305211458a58a99b999639171c55724e3d9b51c0
libdw: Break long or circular DIE ref chains in dwarf_[has]attr_integrate.

Bad DWARF could create a very long or circular DIE ref chain by linking
DW_AT_abstract_origin or DW_AT_specification to the DIE itself. Break
the chain after seeing a large number (16) of DIEs.

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdw/ChangeLog
libdw/dwarf_attr_integrate.c
libdw/dwarf_hasattr_integrate.c