Revert "fix cleanup handling in macho_symfile_read"
authorJoel Brobecker <brobecker@gnat.com>
Mon, 3 Jun 2013 13:22:29 +0000 (13:22 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Mon, 3 Jun 2013 13:22:29 +0000 (13:22 +0000)
This patch indirectly causes a SEGV by creating a dangling pointer.
Reverting this patch while working on a clearer memory management
method for this part of the code.

gdb/Changelog:

        Revert:
        * machoread.c (macho_symfile_read): Assign first cleanup to
        'back_to'.

gdb/ChangeLog
gdb/machoread.c

index 8649045fb821d29dbb4cbbe607c98447b3100aa7..906cb06d380919b79ae2858e0051413f4c5641cf 100644 (file)
@@ -1,3 +1,9 @@
+2013-06-03  Joel Brobecker  <brobecker@adacore.com>
+
+       Revert (indirectly causes a SIGSEGV):
+       * machoread.c (macho_symfile_read): Assign first cleanup to
+       'back_to'.
+
 2013-06-03  Yao Qi  <yao@codesourcery.com>
 
        * mi/mi-cmd-var.c (mi_no_values, mi_simple_values): Move to
index d294960f63d294eb0b74cb78ff0f6ade150ba8c0..9877f07b4d343df6aad6c30bd9b2639be3797108 100644 (file)
@@ -871,10 +871,10 @@ macho_symfile_read (struct objfile *objfile, int symfile_flags)
           struct cleanup *back_to;
 
          symbol_table = (asymbol **) xmalloc (storage_needed);
-         back_to = make_cleanup (xfree, symbol_table);
+         make_cleanup (xfree, symbol_table);
 
           init_minimal_symbol_collection ();
-          make_cleanup_discard_minimal_symbols ();
+          back_to = make_cleanup_discard_minimal_symbols ();
 
          symcount = bfd_canonicalize_symtab (objfile->obfd, symbol_table);
 
This page took 0.028264 seconds and 4 git commands to generate.