From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24370 invoked by alias); 3 Feb 2011 20:42:34 -0000 Received: (qmail 24362 invoked by uid 22791); 3 Feb 2011 20:42:33 -0000 X-SWARE-Spam-Status: No, hits=-2.3 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) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Feb 2011 20:42:28 +0000 Received: from hpaq14.eem.corp.google.com (hpaq14.eem.corp.google.com [172.25.149.14]) by smtp-out.google.com with ESMTP id p13KgQSD022379 for ; Thu, 3 Feb 2011 12:42:26 -0800 Received: from iym1 (iym1.prod.google.com [10.241.52.1]) by hpaq14.eem.corp.google.com with ESMTP id p13KeZOr025592 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Thu, 3 Feb 2011 12:42:24 -0800 Received: by iym1 with SMTP id 1so1005900iym.31 for ; Thu, 03 Feb 2011 12:42:24 -0800 (PST) Received: by 10.42.224.9 with SMTP id im9mr13231062icb.308.1296765744216; Thu, 03 Feb 2011 12:42:24 -0800 (PST) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id i2sm858863icv.15.2011.02.03.12.42.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 03 Feb 2011 12:42:23 -0800 (PST) From: Ian Lance Taylor To: Richard Guenther Cc: Sriraman Tallam , binutils , =?utf-8?B?RG91ZyBLd2FuICjpl5zmjK/lvrcp?= Subject: Re: Dangling pointer in ICF from c_str method. References: Date: Thu, 03 Feb 2011 20:42:00 -0000 In-Reply-To: (Richard Guenther's message of "Thu, 3 Feb 2011 10:41:13 +0100 (CET)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes 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/msg00038.txt.bz2 Richard Guenther writes: > 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. I applied Sri's patch to binutils 2.21 branch. Ian