summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-04-06 08:15:58 +0000
committerNick Clifton <nickc@redhat.com>2003-04-06 08:15:58 +0000
commit65ba7ccad0a56ca2d1ba07d69c1890e7778ad550 (patch)
tree4fde8664072eb68a494b026d618d8fb6316f8112
parenta8e4b599ae269c19775952f9c426c0931fdf933a (diff)
downloadbinutils-redhat-kettenis_i386newframe-20030406-branch.tar.gz
(bfd_simple_get_relocated_section_contents): Disable free that leads to GDBkettenis_i386newframe-20030406-branchpointkettenis_i386newframe-20030406-branch
vs BFD memory corruption.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/simple.c11
2 files changed, 16 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5428fcfde3..1264aa384d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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
diff --git a/bfd/simple.c b/bfd/simple.c
index a91d118e40..a247f1153b 100644
--- a/bfd/simple.c
+++ b/bfd/simple.c
@@ -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);