From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59204 invoked by alias); 15 Jan 2019 17:49:23 -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 49082 invoked by uid 89); 15 Jan 2019 17:49:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 15 Jan 2019 17:49:13 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id x0FHn60B010409 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 15 Jan 2019 12:49:11 -0500 Received: by simark.ca (Postfix, from userid 112) id A29801E7BF; Tue, 15 Jan 2019 12:49:06 -0500 (EST) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id A18251E4C2; Tue, 15 Jan 2019 12:49:04 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 15 Jan 2019 17:49:00 -0000 From: Simon Marchi To: Tom Tromey Cc: Philippe Waroquiers , gdb-patches@sourceware.org Subject: Re: [RFA] Fix leaks in macro definitions. In-Reply-To: <87h8e9on9h.fsf@tromey.com> References: <20190115055611.17967-1-philippe.waroquiers@skynet.be> <63b6768fbedbe46b7a46f0d29f7b178c@polymtl.ca> <87h8e9on9h.fsf@tromey.com> Message-ID: <884d32995ce9ac8f412e22b5207d9a6d@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00350.txt.bz2 On 2019-01-15 12:15, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> Would you consider that a bug in the splay tree implementation? > Simon> Should it use the new key and free the old one with the key > Simon> deallocation function? > > Yes, I would think so as well, given that we pass key- and > value-deletion functions to splay_tree_new_with_allocator. Ok. Fixing this in the splay tree code would be a quite long task (reviewing all usages in binutils-gdb and gcc, I don't think this code is available externally?), so I am ok with this patch which fixes the issue in the mean time. Tom? Simon