This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]