aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/read.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-08-31 09:37:44 +0200
committerTom de Vries <tdevries@suse.de>2023-08-31 09:37:44 +0200
commit0b8b932dce26ef8e907b3b3c06b01a99420245fe (patch)
tree610f4bd6c3ea21d53b288277849ce20c5c607680 /gdb/dwarf2/read.c
parentcd60a3956da29350d2e79bd6458d5cd77a4a18d0 (diff)
downloadgdb-0b8b932dce26ef8e907b3b3c06b01a99420245fe.zip
gdb-0b8b932dce26ef8e907b3b3c06b01a99420245fe.tar.gz
gdb-0b8b932dce26ef8e907b3b3c06b01a99420245fe.tar.bz2
[gdb/symtab] Fix uninitialized memory in buildsym_compunit::finish_block_internal
When running test-case gdb.dwarf2/per-bfd-sharing.exp with target board stabs, gdb either segfaults or asserts due to reading uninitialized memory, allocated here in buildsym_compunit::finish_block_internal: ... ftype->set_fields ((struct field *) TYPE_ALLOC (ftype, nparams * sizeof (struct field))); ... Fix this by using TYPE_ZALLOC instead. Tested on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com> PR symtab/30810 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30810
Diffstat (limited to 'gdb/dwarf2/read.c')
0 files changed, 0 insertions, 0 deletions