diff options
author | Alan Modra <amodra@gmail.com> | 2020-12-03 16:10:37 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-12-04 11:12:21 +1030 |
commit | 288f0ba26478ec3a8926d54319b9c899e64e26a7 (patch) | |
tree | 85c201688e41ebb65db77e9f3d579c90601f507b /gas | |
parent | 726d7d1ecfd1fc0966983e1d5e59b527b90cf7c5 (diff) | |
download | fsf-binutils-gdb-288f0ba26478ec3a8926d54319b9c899e64e26a7.zip fsf-binutils-gdb-288f0ba26478ec3a8926d54319b9c899e64e26a7.tar.gz fsf-binutils-gdb-288f0ba26478ec3a8926d54319b9c899e64e26a7.tar.bz2 |
asan: readelf: memory leaks
This tidies some code used by readelf, hopefully fixing some
intermittent oss-fuzz bug reports that likely could only be reproduced
by feeding readelf two or more object files on the command line. The
second and subsequent file may see non-zero state in .bss variables,
and non-initial values in .data variables. This patch fixes some of
those, and moves some .data variables to .rodata.
* dwarf.c (frame_display_row): Do without static variable "sloc".
(cu_tu_indexes_read): Move to file scope.
(free_debug_memory): Reset it here, along with level_type_signed.
Free and clear a number of other static variables.
* readelf.c (arm_attr_public_tag <table>): Constify, updating..
(arm_attr_tag_*): ..all these uses.
(process_mips_specific): Free "rels" on error path.
Diffstat (limited to 'gas')
0 files changed, 0 insertions, 0 deletions