From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27854 invoked by alias); 3 Feb 2011 09:41:23 -0000 Received: (qmail 27844 invoked by uid 22791); 3 Feb 2011 09:41:22 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Feb 2011 09:41:16 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id A560393EE3; Thu, 3 Feb 2011 10:41:13 +0100 (CET) Date: Thu, 03 Feb 2011 09:41:00 -0000 From: Richard Guenther To: Sriraman Tallam Cc: binutils , =?GB2312?Q?Doug_Kwan_=28=EAP=D5=F1=B5=C2=29?= , Ian Lance Taylor Subject: Re: Dangling pointer in ICF from c_str method. In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00035.txt.bz2 On Wed, 2 Feb 2011, Sriraman Tallam wrote: > Hi, > > Doug Kwan found a bug in ICF caused by a dangling pointer from > using c_str on a temporary string object. I have attached a patch to > fix it. I suspect this as the cause of bug reported in : > http://sourceware.org/bugzilla/show_bug.cgi?id=12388. Richard, could > you please see if this patch fixes the bug as I am unable to reproduce > it. It doesn't apply to the 2.21 release for me. I'll pick it up when 2.21.1 is released. Richard.