[PATCH] solib-svr4.c, several memory leaks

Markus Deuling deuling@de.ibm.com
Fri Aug 10 07:16:00 GMT 2007


msnyder@sonic.net schrieb:
> Jim, Kevin,
> 
> Apparently we can't free the tmp name while bfd has the file open.
> Moving the xfree to later, after it has been closed, seems to fix
> the segfault.
> 
> See attached patch.
> Michael
> 
>> Folks,
>>
>> GDB started acting strange today, segfaulting when trying to open some
>> binaries, GDB itself included. Other binaries would work OK.
>>
>> Log:
>>
>> -------
>> ~/builds/gdb-head/> gdb-head-64bit/gdb/gdb gdb-head-64bit/gdb/gdb
>> GNU gdb 6.6.50.20070809-cvs
>> Copyright (C) 2007 Free Software Foundation, Inc.
>> GDB is free software, covered by the GNU General Public License, and you
>> are
>> welcome to change it and/or distribute copies of it under certain
>> conditions.
>> Type "show copying" to see the conditions.
>> There is absolutely no warranty for GDB.  Type "show warranty" for
>> details.
>> This GDB was configured as "powerpc64-unknown-linux-gnu"...
>> startUsing host libthread_db library "/lib64/ppc970/libthread_db.so.1".
>> (gdb) start
>> Breakpoint 1 at 0x10060b3c: file gdb-head/gdb/gdb.c, line 30.
>> Starting program: gdb-head-64bit/gdb/gdb
>> BFD: reopening : No such file or directory
>>
>> Segmentation fault
>> -------
>>
>>
>> I tracked down the root of the problem and this patch appears to be the
>> problem. Reverting it back fixes the problem.
> 

Yes, it does. Please commit. These are my current testsuite results on x86 :-( :

# of expected passes		5706
# of unexpected failures	1233
<...>
# of unresolved testcases	4334


-- 
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com



More information about the Gdb-patches mailing list