* libdw/dwarf_offdie.c (__libdw_offdie): Use dwarf_lock. Signed-off-by: Aaron Merey <ame...@redhat.com> --- v2 changes: Lock only for the duration of __libdw_findcu.
libdw/dwarf_offdie.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libdw/dwarf_offdie.c b/libdw/dwarf_offdie.c index 883720de..a9729947 100644 --- a/libdw/dwarf_offdie.c +++ b/libdw/dwarf_offdie.c @@ -58,7 +59,10 @@ __libdw_offdie (Dwarf *dbg, Dwarf_Off offset, Dwarf_Die *result, result->addr = (char *) data->d_buf + offset; /* Get the CU. */ + mutex_lock (dbg->dwarf_lock); result->cu = __libdw_findcu (dbg, offset, debug_types); + mutex_unlock (dbg->dwarf_lock); + if (result->cu == NULL) { /* This should never happen. The input file is malformed. */ -- 2.48.1