This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb/1627: gdb crashes inside malloc when running something


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++)
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]