This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] bfd_close_all_done calling _close_and_cleanup
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 30 Aug 2017 21:10:46 -0400
- Subject: [binutils-gdb] bfd_close_all_done calling _close_and_cleanup
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT e234de6be5cc96286e0efb90e8d9fce51239e901 ***
Author: Alan Modra <amodra@gmail.com>
Branch: master
Commit: e234de6be5cc96286e0efb90e8d9fce51239e901
bfd_close_all_done calling _close_and_cleanup
elf64_vms_close_and_cleanup calls bfd_get_size, which calls
iovec->bstat. cache_bstat ends up adding the bfd to the cache lru
list, negating the bfd_cache_close call in bfd_close_all_done. So
there is a dangling pointer into the freed and then reused bfd. Thus,
bfd_cache_close must be called after _close_and_cleanup, or better,
via iovec->bclose.
PR binutils/22032
* opncls.c (bfd_close_all_done): Don't call bfd_cache_close
before _close_and_cleanup. Call iovec->bclose after.
(bfd_close): Remove code common to, and call, bfd_close_all_done.
- Follow-Ups:
- *** COMPILATION FAILED *** Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Ubuntu-AArch32-native-gdbserver-m32, branch master *** BREAKAGE ***
- Failures on Fedora-s390x-m64, branch master
- *** COMPILATION FAILED *** Failures on Ubuntu-AArch32-m32, branch master *** BREAKAGE ***
- Failures on Ubuntu-AArch64-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Ubuntu-AArch64-m64, branch master
- Failures on Fedora-ppc64le-native-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-m64, branch master
- Failures on Fedora-ppc64le-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-cc-with-index, branch master