diff mbox series

libbacktrace patch committed: Initialize DWARF 5 fields of unit

Message ID CAOyqgcVL3kZm8um3BkjuBSn_pq-gvaBXBVzGQO=0_jbhqQH9fw@mail.gmail.com
State New
Headers show
Series libbacktrace patch committed: Initialize DWARF 5 fields of unit | expand

Commit Message

Ian Lance Taylor Feb. 16, 2022, 7:38 p.m. UTC
When I added the DWARF 5 support to libbacktrace in 2019-12-13 I
forgot to initialize the new fields of the unit data structure.
Whoops.  Fixed with this patch.  Bootstrapped and ran libbacktrace and
Go testsuite on x86_64-pc-linux-gnu.  Committed to mainline.

Ian

* dwarf.c (build_address_map): Initialize DWARF 5 fields of unit.
ab59cb2055658a72fdccba0be76eeadd222ffef6
diff mbox series

Patch

diff --git a/libbacktrace/dwarf.c b/libbacktrace/dwarf.c
index c0bae0e501e..2158bc14065 100644
--- a/libbacktrace/dwarf.c
+++ b/libbacktrace/dwarf.c
@@ -2221,6 +2221,9 @@  build_address_map (struct backtrace_state *state, uintptr_t base_address,
       u->comp_dir = NULL;
       u->abs_filename = NULL;
       u->lineoff = 0;
+      u->str_offsets_base = 0;
+      u->addr_base = 0;
+      u->rnglists_base = 0;
 
       /* The actual line number mappings will be read as needed.  */
       u->lines = NULL;