From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28598 invoked by alias); 4 Mar 2011 18:27:37 -0000 Received: (qmail 28579 invoked by uid 22791); 4 Mar 2011 18:27:36 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Mar 2011 18:27:32 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 06755122D2; Fri, 4 Mar 2011 10:27:31 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost4.vmware.com (Postfix) with ESMTP id F021DCA01D; Fri, 4 Mar 2011 10:27:30 -0800 (PST) Message-ID: <4D712F12.8050808@vmware.com> Date: Fri, 04 Mar 2011 18:27:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: Tom Tromey CC: Tristan Gingold , "gdb-patches@sourceware.org" , "gcc-patches@gcc.gnu.org" Subject: Re: libiberty/cplus-dem.c, ada-demangle: plug memory leak. References: <4D70061C.10904@vmware.com> <20110303213008.GY30899@tyan-ft48-01.lab.bos.redhat.com> <4D700F5D.2030109@vmware.com> <807E3430-F4F7-464D-8E8A-527A86BA3D88@adacore.com> <4D712A5F.1040307__35010.4677411311$1299262072$gmane$org@vmware.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-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: 2011-03/txt/msg00305.txt.bz2 Tom Tromey wrote: >>>>>> "Michael" == Michael Snyder writes: > > Michael> Are you sure? There is a path to "goto unknown" from before the > Michael> call to the alloc function. It might actually be null. Some > Michael> versions of 'free' don't like that. > > This isn't an issue with free any more. Jim Meyering did some research > into it a while ago and fixed a number of popular free software projects > to remove the useless test. Here's a page with some interesting data: > > http://www.winehq.org/pipermail/wine-patches/2006-October/031544.html > > Tom Thanks for the info. Checking in without the null pointer test. How come 'xfree' in gdb/utils.c still checks for null?