libdw: Handle NULL dbg for call_ref, GNU_implicit_pointer and addr DW_OPs.
authorMark Wielaard <mjw@redhat.com>
Fri, 2 Jan 2015 23:09:45 +0000 (00:09 +0100)
committerMark Wielaard <mjw@redhat.com>
Thu, 15 Jan 2015 13:11:37 +0000 (14:11 +0100)
commit5316e412a4931d99ac5611e5f89ef187d4e9e335
treef73de6527f8f4a736e17c2cc69cfec11c2accf88
parentcc62e378c292daaded19f1fe03681d63b7437ea0
libdw: Handle NULL dbg for call_ref, GNU_implicit_pointer and addr DW_OPs.

afl-fuzz pointed out that __libdw_intern_expression didn't handle CFI
containing DW_OP_call_ref, DW_OP_implicit_pointer or DW_OP_addr. Because
in that case the Dwarf dbg is NULL. Both DW_OP_call_ref and
DW_OP_implicit_pointer cannot be used in CFI. That is just an error.
But DW_OP_addr can be. Without a Dwarf dbg we'll need to read the address
argument directly. Don't use __libdw_read_address_inc which might do a
relocation of the value read. But in practice the relocation hook isn't
implemented anyway.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
libdw/ChangeLog
libdw/dwarf_getlocation.c