[PATCH] libdw: Return an error in dwarf_getlocation_attr for missing .debug_addr.

Mark Wielaard mark@klomp.org
Sun Jun 10 09:05:00 GMT 2018


On Fri, 2018-06-08 at 11:55 +0200, Mark Wielaard wrote:
> When constructing a "fake" Dwarf_Attribute for DW_OP_GNU_const_index,
> DW_OP_constx, DW_OP_GNU_addr_index or DW_OP_addrx, we would create a
> fake attribute pointing to the actual data in the .debug_addr section.
> 
> We would even do that if there was no .debug_addr section assuming
> dwarf_formaddr or dwarf_formudata would generate an error. But when
> there is no .debug_addr there is also no fake_addr_cu, so the
> dwarf_form* functions cannot check the value is correct (and crash).
> 
> Fix by returning an error early from dwarf_getlocation_attr indicating
> bad DWARF data.

Pushed to master.



More information about the Elfutils-devel mailing list