Dangling bfd pointer in archive cache.
authorJoel Brobecker <brobecker@gnat.com>
Tue, 16 Oct 2012 22:47:03 +0000 (22:47 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Tue, 16 Oct 2012 22:47:03 +0000 (22:47 +0000)
This dandling pointer eventually leads to a crash when trying to run
on ppc-aix a program using threading...

bfd/ChangeLog:

        * coff-rs6000.c (rs6000coff_vec): Set _close_and_cleanup
        field to _bfd_archive_close_and_cleanup.
        (pmac_xcoff_vec): Likewise.

bfd/ChangeLog
bfd/coff-rs6000.c

index 29cb5c679760564ce9b5e250d312810a82bd27f0..da4262b7ae248f24cf8425b36bb1b523776b986e 100644 (file)
@@ -1,3 +1,9 @@
+2012-10-16  Joel Brobecker  <brobecker@adacore.com>
+
+       * coff-rs6000.c (rs6000coff_vec): Set _close_and_cleanup
+       field to _bfd_archive_close_and_cleanup.
+       (pmac_xcoff_vec): Likewise.
+
 2012-10-16  Sofiane Naci  <sofiane.naci@arm.com>
 
        * elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for
index edbef95e156d82affc8e2797f24583c43d765c17..0945aca0ef738f27ca46dcdac14ff7560ef10186 100644 (file)
@@ -4076,7 +4076,7 @@ const bfd_target rs6000coff_vec =
     },
 
     /* Generic */
-    bfd_true,
+    _bfd_archive_close_and_cleanup,
     bfd_true,
     coff_new_section_hook,
     _bfd_generic_get_section_contents,
@@ -4332,7 +4332,7 @@ const bfd_target pmac_xcoff_vec =
     },
 
     /* Generic */
-    bfd_true,
+    _bfd_archive_close_and_cleanup,
     bfd_true,
     coff_new_section_hook,
     _bfd_generic_get_section_contents,