[PATCH] libdwfl: Only intern CU when not EOF marker and cuoff points to a DIE.

Mark Wielaard mjw at redhat.com
Tue May 12 14:55:18 UTC 2015


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.


More information about the elfutils-devel mailing list