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] libdw: Return an error in dwarf_getlocation_attr for missing .debug_addr.


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.


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