]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdw: Don't free uninitialized Dwarf_Abbrev_Hash's of "fake" CUs.
authorJonathon Anderson <jma14@rice.edu>
Fri, 1 Nov 2019 13:14:05 +0000 (08:14 -0500)
committerMark Wielaard <mark@klomp.org>
Sat, 2 Nov 2019 00:31:47 +0000 (01:31 +0100)
commit09c9e8091c36eff7f1f4220ac12afe66d0322c59
tree4c4c42d6de3218fe90fd542a45c99035cf846400
parent347ff6f437420303b95cd1cfa6992a37a769e84a
libdw: Don't free uninitialized Dwarf_Abbrev_Hash's of "fake" CUs.

fake_{loc,loclists,addr}_cu are Dwarf_CUs that are created separate from
all the others, so their contents are minimal and mostly initialized by
a calloc. On dwarf_end however, they are freed through the same code path
as all the others, so they call DAH_free like all the others. This changes
that so that these three are exempt from DAH and split-DWARF matters, and
swaps the calloc for a malloc so Memcheck will catch any others.

Signed-off-by: Jonathon Anderson <jma14@rice.edu>
libdw/ChangeLog
libdw/dwarf_begin_elf.c
libdw/dwarf_end.c