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: DIE chains not ending with null entry


On Wed, 2011-03-09 at 15:18 +0100, Petr Machata wrote:
> Alas, the case that we see here is special:
> 
>   Dwarf_Die die_mem, *die = dwarf_offdie (dw, 0xab, &die_mem);
>   Dwarf_Die child;
>   dwarf_child (die, &child); // this actually passes
> 
> So libdw happily gives us a DIE that supposedly lies at 0xb1,
> interpreting the first bytes of .debug_abbrev as DIE.
> 
> I might turn that combination (empty chain + no null entry) into a hard
> error in dwarflint, but that seems rather convoluted.  I think this is
> something that should be fixed in libdw.  I've done that, the result is
> on the branch pmachata/dwarf_child_overrun.

That makes sense to me. dwarf_child () falls off the end of the
debug_info section, so should return an error.


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