From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13486 invoked by alias); 9 Aug 2007 22:45:49 -0000 Received: (qmail 13304 invoked by uid 22791); 9 Aug 2007 22:45:48 -0000 X-Spam-Check-By: sourceware.org Received: from igw1.br.ibm.com (HELO igw1.br.ibm.com) (32.104.18.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 09 Aug 2007 22:45:40 +0000 Received: from mailhub1.br.ibm.com (mailhub1 [9.18.232.109]) by igw1.br.ibm.com (Postfix) with ESMTP id 364B11480F7 for ; Thu, 9 Aug 2007 19:29:22 -0300 (BRT) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.18.232.47]) by mailhub1.br.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l79MjbrX1536244 for ; Thu, 9 Aug 2007 19:45:37 -0300 Received: from d24av02.br.ibm.com (loopback [127.0.0.1]) by d24av02.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l79Mjati025260 for ; Thu, 9 Aug 2007 19:45:36 -0300 Received: from dyn532126.br.ibm.com (dyn532126.br.ibm.com [9.18.238.250]) by d24av02.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l79MjaoR025257; Thu, 9 Aug 2007 19:45:36 -0300 Subject: Re: [PATCH] solib-svr4.c, several memory leaks From: Luis Machado Reply-To: luisgpm@linux.vnet.ibm.com To: Jim Blandy , gdb-patches@sourceware.org In-Reply-To: <21109.12.7.175.2.1186596556.squirrel@webmail.sonic.net> References: <23585.12.7.175.2.1186282957.squirrel@webmail.sonic.net> <21109.12.7.175.2.1186596556.squirrel@webmail.sonic.net> Content-Type: text/plain Date: Thu, 09 Aug 2007 22:45:00 -0000 Message-Id: <1186699535.4524.14.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00191.txt.bz2 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. Backtrace output: ------- Program received signal SIGSEGV, Segmentation fault. 0x00000400002a8b30 in .strcmp () from /lib64/tls/libc.so.6 (gdb) bt #0 0x00000400002a8b30 in .strcmp () from /lib64/tls/libc.so.6 #1 0x0000000010089d14 in bfd_lookup_symbol (abfd=0x1095a980, symname=0x106de700 "r_debug_state") at gdb-head/gdb/solib-svr4.c:305 ------- Best regards, Luis On Wed, 2007-08-08 at 11:09 -0700, msnyder@sonic.net wrote: > > > > msnyder@sonic.net writes: > >> 2007-08-04 Michael Snyder > >> > >> * solib-svr4.c (open_symbol_file_object): Memory leak. > >> (svr4_current_sos): Ditto. > >> (enable_break): Ditto. > > > > Looks okay to me. > > Committed. Thanks Jim and Kevin. > > -- Luis Machado Software Engineer IBM Linux Technology Center LoP Toolchain/Debuggers' team Phone: +55 19-2132-2218 T/L: 839-2218 e-mail: luisgpm@vnet.linux.ibm.com