(bfd_simple_get_relocated_section_contents): Disable free that leads to GDB
authorNick Clifton <nickc@redhat.com>
Sun, 6 Apr 2003 08:15:58 +0000 (08:15 +0000)
committerNick Clifton <nickc@redhat.com>
Sun, 6 Apr 2003 08:15:58 +0000 (08:15 +0000)
vs BFD memory corruption.

bfd/ChangeLog
bfd/simple.c

index 5428fcfde32203efb9eb733d8b154f144d42b5e2..1264aa384dfbaed69e42baba345069a19efd35c7 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-06  Andrew Cagney  <cagney@redhat.com>
+
+       * simple.c (bfd_simple_get_relocated_section_contents): Disable
+       free that leads to GDB vs BFD memory corruption.
+
 2003-04-04  Stephane Carrez  <stcarrez@nerim.fr>
 
        * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
index a91d118e40d3d430b785c7f12e3cbe88a06d0460..a247f1153ba81030e05f393cba0ddd888ebe7450 100644 (file)
@@ -261,8 +261,19 @@ bfd_simple_get_relocated_section_contents (abfd, sec, outbuf, symbol_table)
   if (contents == NULL && data != NULL)
     free (data);
 
+#if 0
+  /* NOTE: cagney/2003-04-05: This free, which was introduced on
+     2003-03-31 to stop a memory leak, caused a memory corruption
+     between GDB and BFD.  The problem, which is stabs specific, can
+     be identified by a bunch of failures in relocate.exp vis:
+
+       gdb.base/relocate.exp: get address of static_bar
+
+     Details of the problem can be found on the binutils@ mailing
+     list, see the discussion thread: "gdb.mi/mi-cli.exp failures".  */
   if (storage_needed != 0)
     free (symbol_table);
+#endif
 
   bfd_map_over_sections (abfd, simple_restore_output_info, saved_offsets);
   free (saved_offsets);
This page took 0.045638 seconds and 4 git commands to generate.