This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/1627: gdb crashes inside malloc when running something
- From: Olivier Crete <tester at tester dot ca>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 27 Apr 2004 19:18:01 -0000
- Subject: Re: gdb/1627: gdb crashes inside malloc when running something
- Reply-to: Olivier Crete <tester at tester dot ca>
The following reply was made to PR gdb/1627; it has been noted by GNATS.
From: Olivier Crete <tester@tester.ca>
To: gdb-gnats@sources.redhat.com
Cc:
Subject: Re: gdb/1627: gdb crashes inside malloc when running something
Date: Tue, 27 Apr 2004 21:10:07 +0200
oops.. corrected version of the last patch.. I dont need to initialise
the vars to null in the recent cvs .. oops
Index: gdb/symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.128
diff -b -u -u -2 -r1.128 symfile.c
--- gdb/symfile.c 21 Apr 2004 23:52:21 -0000 1.128
+++ gdb/symfile.c 27 Apr 2004 19:09:15 -0000
@@ -803,9 +803,10 @@
discard_cleanups (my_cleanups);
- orig_addrs = alloc_section_addr_info (bfd_count_sections (abfd));
- my_cleanups = make_cleanup (xfree, orig_addrs);
if (addrs)
{
int i;
+ orig_addrs = alloc_section_addr_info (addrs->num_sections);
+ my_cleanups = make_cleanup (xfree, orig_addrs);
+
orig_addrs->num_sections = addrs->num_sections;
for (i = 0; i < addrs->num_sections; i++)