From: Ian Lance Taylor Date: Wed, 19 Feb 2020 18:30:51 +0000 (-0800) Subject: libbacktrace: don't free ELF strtab if error occurs after saving syminfo X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8600440e1479a8bd0394509b86a4d85d98ca6c8a;p=gcc.git libbacktrace: don't free ELF strtab if error occurs after saving syminfo * elf.c (elf_add): Don't free strtab if an error occurs after recording symbol information. --- diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog index 6fa15fc4e96..13d907011d8 100644 --- a/libbacktrace/ChangeLog +++ b/libbacktrace/ChangeLog @@ -1,3 +1,8 @@ +2020-05-09 Ian Lance Taylor + + * elf.c (elf_add): Don't free strtab if an error occurs after + recording symbol information. + 2020-05-09 Ian Lance Taylor PR libbacktrace/88745 diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c index eb481c588e7..1216af86fd9 100644 --- a/libbacktrace/elf.c +++ b/libbacktrace/elf.c @@ -3011,6 +3011,7 @@ elf_add (struct backtrace_state *state, const char *filename, int descriptor, string table permanently. */ backtrace_release_view (state, &symtab_view, error_callback, data); symtab_view_valid = 0; + strtab_view_valid = 0; *found_sym = 1;