This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] libdwfl: Only intern CU when not EOF marker and cuoff points to a DIE.
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Tue, 12 May 2015 16:55:18 +0200
- Subject: 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.