]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdwfl: Only intern CU when not EOF marker and cuoff points to a DIE.
authorMark Wielaard <mjw@redhat.com>
Thu, 7 May 2015 16:35:48 +0000 (18:35 +0200)
committerMark Wielaard <mjw@redhat.com>
Tue, 12 May 2015 14:54:05 +0000 (16:54 +0200)
commitf0855403012fe34aee248353e4435d0b5c6576ef
treed2a30b4d07c7d6b2719b86dc5441059d62a22fa5
parent281bb49c71665f306b23107cbf821636f59211e0
libdwfl: Only intern CU when not EOF marker and cuoff points to a DIE.

We need to check the cuoff points to a real Dwarf_Die before trying to
intern the cu with tsearch. Otherwise bogus keys might end up in the
search tree with NULL cus. That will cause crashes in compare_cukey
during next insertion or deletion of cus. We also don't want to insert
the EOF marker and unconditionally tdestroy the lazy_cu_root. The EOF
could be caused by bad DWARF from a bogus agranges entry.

https://bugzilla.redhat.com/show_bug.cgi?id=1170810#c30

Signed-off-by: Mark Wielaard <mjw@redhat.com>
libdwfl/ChangeLog
libdwfl/cu.c