From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13513 invoked by alias); 18 Sep 2010 16:03:23 -0000 Received: (qmail 13503 invoked by uid 22791); 18 Sep 2010 16:03:21 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 18 Sep 2010 16:03:14 +0000 Received: from kpbe17.cbf.corp.google.com (kpbe17.cbf.corp.google.com [172.25.105.81]) by smtp-out.google.com with ESMTP id o8IG3AfJ018538 for ; Sat, 18 Sep 2010 09:03:10 -0700 Received: from vws16 (vws16.prod.google.com [10.241.21.144]) by kpbe17.cbf.corp.google.com with ESMTP id o8IG38lZ005865 for ; Sat, 18 Sep 2010 09:03:09 -0700 Received: by vws16 with SMTP id 16so2992819vws.0 for ; Sat, 18 Sep 2010 09:03:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.122.87 with SMTP id k23mr3309008vcr.14.1284825787545; Sat, 18 Sep 2010 09:03:07 -0700 (PDT) Received: by 10.220.97.200 with HTTP; Sat, 18 Sep 2010 09:03:07 -0700 (PDT) In-Reply-To: <4C937E2D.80500@redhat.com> References: <4C937E2D.80500@redhat.com> Date: Sun, 19 Sep 2010 17:39:00 -0000 Message-ID: Subject: Re: [patch] PR 12028 "GDB crashes on a double free during overload resolution" From: Doug Evans To: sami wagiaalla Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true 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: 2010-09/txt/msg00330.txt.bz2 On Fri, Sep 17, 2010 at 7:41 AM, sami wagiaalla wrote: > old_cleanups was being set twice making the later call to discard_cleanups > ignore the first 'make_cleanup' request. > > The patch is proposed for both head and the 7.2 branch. > > This has been regression tested on x8664 with gcc-4.4.4-10.fc13 > > Sami > Hi. This patch is ok. Looking at the function though, is this a memory leak? i.e. you want to do_cleanups here, not discard them (right?). else { *oload_syms = new_oload_syms; *oload_champ = new_oload_champ; *oload_champ_bv = new_oload_champ_bv; discard_cleanups (old_cleanups); return 0; }