aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-09-03 09:34:37 +0930
committerAlan Modra <amodra@gmail.com>2020-09-03 11:04:46 +0930
commitd48b742bc1a7af6a673e747c91bf7c72518a0b6a (patch)
tree60f4a40277a0d7e54689ab6b25967c31c997d1d2 /ld
parent8807b2206d245d37d81030c693fbdf39f6789e7a (diff)
downloadgdb-d48b742bc1a7af6a673e747c91bf7c72518a0b6a.zip
gdb-d48b742bc1a7af6a673e747c91bf7c72518a0b6a.tar.gz
gdb-d48b742bc1a7af6a673e747c91bf7c72518a0b6a.tar.bz2
heap use after free in xcoff_archive_info_eq
Using an input file objalloc memory for anything that isn't created when opening the bfd is not a good idea. The problem is that this memory can disappear if bfd_free_cached_info is called or when bfd closes files in order to keep the number of open files reasonable. bfd/ * xcofflink.c (xcoff_get_archive_info): Allocate xcoff_archive_info on the output bfd objalloc memory. ld/ * testsuite/ld-scripts/sysroot-prefix.exp (single_sysroot_prefix_test): Log $scriptname.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/testsuite/ld-scripts/sysroot-prefix.exp2
2 files changed, 6 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 0138e88..6c447dd 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2020-09-03 Alan Modra <amodra@gmail.com>
+
+ * testsuite/ld-scripts/sysroot-prefix.exp (single_sysroot_prefix_test):
+ Log $scriptname.
+
2020-08-30 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/ld-elf/dwarf.exp: Append $NOSANTIZE_CFLAGS to CFLAGS.
diff --git a/ld/testsuite/ld-scripts/sysroot-prefix.exp b/ld/testsuite/ld-scripts/sysroot-prefix.exp
index e8b45d1..b7590e2 100644
--- a/ld/testsuite/ld-scripts/sysroot-prefix.exp
+++ b/ld/testsuite/ld-scripts/sysroot-prefix.exp
@@ -164,7 +164,7 @@ proc single_sysroot_prefix_test { type xtestname finalscript ldopt errstr } {
puts $ofd "$finalscript"
close $ofd
- verbose -log "script: $finalscript"
+ verbose -log "script $scriptname: $finalscript"
set res [ld_link $ld tmpdir/output "$ldopt tmpdir/main.o -Ltmpdir -lsysroottest"]
set ld_output "$exec_output"