From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12275 invoked by alias); 10 Oct 2018 14:20:17 -0000 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 Received: (qmail 12251 invoked by uid 89); 10 Oct 2018 14:20:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=unfinished, emails, his X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Oct 2018 14:20:15 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DD9103001254 for ; Wed, 10 Oct 2018 14:20:13 +0000 (UTC) Received: from blade.nx (ovpn-117-250.ams2.redhat.com [10.36.117.250]) by smtp.corp.redhat.com (Postfix) with ESMTP id A6BC21001F53; Wed, 10 Oct 2018 14:20:13 +0000 (UTC) Received: by blade.nx (Postfix, from userid 1000) id B3E8480B0904; Wed, 10 Oct 2018 15:20:12 +0100 (BST) Date: Wed, 10 Oct 2018 14:20:00 -0000 From: Gary Benson To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix badness vector resource leaks found by Coverity Message-ID: <20181010142011.GA12480@blade.nx> References: <1539179578-32250-1-git-send-email-gbenson@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00259.txt.bz2 Pedro Alves wrote: > Please use some more descriptive subject in these emails/commits, > otherwise we're going to end up with dozens of indistinct > "Fix resource leak found by Coverity" patches/emails. :-) Yeah, it just occurred to me to do that, after I looked in my inbox :D > As for the patch itself, I think that we'd still be leaking > bv->rank, right? Not just here, but in the callers of rank_function > as well? Oh, I just looked in valops.c to see what other things did to free the vectors. So there's other leaks in there as well :/ > I have a patch from last year here that converts the badness > vector to a C++ std::vector: > > https://github.com/palves/gdb/commits/palves/badness_vector > > See top two commits. > > I guess a better approach would be to get that in instead. > > Simon had a badness_vector C++ification patch too, > though his was different. ISTR that I prefer my approach, > but I won't be surprised if Simon preferred his. :-) I'll look at them. Were they ever submitted, or unfinished, or... ? Cheers, Gary