From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12293 invoked by alias); 16 Sep 2010 17:01:16 -0000 Received: (qmail 12281 invoked by uid 22791); 16 Sep 2010 17:01:15 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_CF,TW_YC,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Sep 2010 17:01:10 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8GH18RP012314 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 16 Sep 2010 13:01:08 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8GH17Ub016201; Thu, 16 Sep 2010 13:01:07 -0400 Received: from [10.15.16.129] (dhcp-10-15-16-129.yyz.redhat.com [10.15.16.129]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o8GH15pT032140; Thu, 16 Sep 2010 13:01:06 -0400 Message-ID: <4C924D27.3040004@redhat.com> Date: Thu, 16 Sep 2010 17:01:00 -0000 From: sami wagiaalla User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Lightning/1.0b2pre Thunderbird/3.1.2 MIME-Version: 1.0 To: Srinath Avadhanula CC: gdb@sourceware.org Subject: Re: double free when trying to call a C++ function in GDB References: <4C8E6661.7060603@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00098.txt.bz2 On 09/13/2010 08:58 PM, Srinath Avadhanula wrote: > Hi Sami, > >> provide me with a small reproducer that would be very helpful. > > Unfortunately, I am unable to come up with a small reproduction > program which fails. Let me try to describe the situation we have: > > 1. We have a large number of shared libraries which get loaded > 2. One of the libraries has an overloaded function with two signatures: > void printCfgGraph(CG::Cfg* cfg, const char* fname); > void printCfgGraph(CG::Region* region, const char* fname); > 3. CG::Cfg and CG::Region are completely unrelated by inheritance etc. > 4. We make a call in GDB to: > (gdb) call printCfgGraph(mycfg, fname) > where mycfg is of type CG_Cfg which is a super-class of CG::Cfg. > This crashed GDB > That did it :). I reproduced it using your description exactly. Filed a bug here: http://sourceware.org/bugzilla/show_bug.cgi?id=12028 I should have a fix for ya soon! Thanks, Sami