diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-02-19 10:30:51 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-05-09 16:12:48 -0700 |
commit | 8600440e1479a8bd0394509b86a4d85d98ca6c8a (patch) | |
tree | 7bdf99cf8b1ff1ce508c3b9d8e5dcbbfcdc74938 /libbacktrace | |
parent | dea40c941a4d443d1b748bafb8a74f02c360e810 (diff) | |
download | gcc-8600440e1479a8bd0394509b86a4d85d98ca6c8a.zip gcc-8600440e1479a8bd0394509b86a4d85d98ca6c8a.tar.gz gcc-8600440e1479a8bd0394509b86a4d85d98ca6c8a.tar.bz2 |
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.
Diffstat (limited to 'libbacktrace')
-rw-r--r-- | libbacktrace/ChangeLog | 5 | ||||
-rw-r--r-- | libbacktrace/elf.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog index 6fa15fc..13d9070 100644 --- a/libbacktrace/ChangeLog +++ b/libbacktrace/ChangeLog @@ -1,5 +1,10 @@ 2020-05-09 Ian Lance Taylor <iant@golang.org> + * elf.c (elf_add): Don't free strtab if an error occurs after + recording symbol information. + +2020-05-09 Ian Lance Taylor <iant@golang.org> + PR libbacktrace/88745 * macho.c: New file. * filetype.awk: Recognize Mach-O files. diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c index eb481c5..1216af8 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; |