On Thu, 2015-05-07 at 19:16 +0200, Mark Wielaard wrote: > This replaces the two previously proposed patches for libdwfl/cu.c: > libdwfl: Sanity check cu offset before trying to intern. > libdwfl: Arange CU cannot point to the EOF marker. > > <---> > > 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.
Pushed to master, wrapping the new tests in likely/unlikely.
