From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31202 invoked by alias); 14 Sep 2010 00:59:09 -0000 Received: (qmail 31194 invoked by uid 22791); 14 Sep 2010 00:59:08 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_CF,TW_YC X-Spam-Check-By: sourceware.org Received: from mail-bw0-f41.google.com (HELO mail-bw0-f41.google.com) (209.85.214.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Sep 2010 00:59:03 +0000 Received: by bwz6 with SMTP id 6so6311191bwz.0 for ; Mon, 13 Sep 2010 17:58:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.55.211 with SMTP id v19mr3688481bkg.153.1284425937750; Mon, 13 Sep 2010 17:58:57 -0700 (PDT) Received: by 10.204.113.211 with HTTP; Mon, 13 Sep 2010 17:58:57 -0700 (PDT) In-Reply-To: <4C8E6661.7060603@redhat.com> References: <4C8E6661.7060603@redhat.com> Date: Tue, 14 Sep 2010 00:59:00 -0000 Message-ID: Subject: Re: double free when trying to call a C++ function in GDB From: Srinath Avadhanula To: sami wagiaalla Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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/msg00083.txt.bz2 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 I tried to reproduce this, but without any shared libraries. I do not know if that would make a difference. Let me know if there is some instrumentation I can add somewhere to help you narrow this down. Thanks, Srinath