aboutsummaryrefslogtreecommitdiff
path: root/bfd/ChangeLog
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-05-21 23:34:58 +0930
committerAlan Modra <amodra@gmail.com>2020-05-21 23:39:36 +0930
commit0490dd41ae89e66efd8b3cee122c189a481269de (patch)
treeea591291023428f54453f894bfb51aa4daa961f2 /bfd/ChangeLog
parentd96bf37ba8360320db4d531008634b3f61af06f5 (diff)
downloadfsf-binutils-gdb-0490dd41ae89e66efd8b3cee122c189a481269de.zip
fsf-binutils-gdb-0490dd41ae89e66efd8b3cee122c189a481269de.tar.gz
fsf-binutils-gdb-0490dd41ae89e66efd8b3cee122c189a481269de.tar.bz2
Re: PR25993, read of freed memory
git commit 7b958a48e132 put the bfd filename in the bfd objalloc memory. That means the filename is freed by _bfd_free_cached_info. Which is called by _bfd_compute_and_write_armap to tidy up symbol tables after they are done with. Unfortunately, _bfd_write_archive_contents wants to seek and read from archive elements after that point, and if the number of elements exceeds max_open_files in cache.c then some of those elements will have their files closed. To reopen, you need the filename. PR 25993 * opncls.c (_bfd_free_cached_info): Keep a copy of the bfd filename. (_bfd_delete_bfd): Free the copy. (_bfd_new_bfd): Free nbfd->memory on error.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r--bfd/ChangeLog8
1 files changed, 8 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index bc51d86..3dc0356 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,13 @@
2020-05-21 Alan Modra <amodra@gmail.com>
+ PR 25993
+ * opncls.c (_bfd_free_cached_info): Keep a copy of the bfd
+ filename.
+ (_bfd_delete_bfd): Free the copy.
+ (_bfd_new_bfd): Free nbfd->memory on error.
+
+2020-05-21 Alan Modra <amodra@gmail.com>
+
* aoutx.h: Replace "if (x) free (x)" with "free (x)" throughout.
* archive.c, * bfd.c, * bfdio.c, * coff-alpha.c, * coff-ppc.c,
* coff-sh.c, * coff-stgo32.c, * coffcode.h, * coffgen.c,