From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3204 invoked by alias); 3 Aug 2009 16:46:47 -0000 Received: (qmail 3192 invoked by uid 22791); 3 Aug 2009 16:46:45 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 Aug 2009 16:46:38 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n73Gka1D023351; Mon, 3 Aug 2009 12:46:36 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n73GkZq0011933; Mon, 3 Aug 2009 12:46:36 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n73GkYFX028456; Mon, 3 Aug 2009 12:46:35 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 982083782CA; Mon, 3 Aug 2009 10:46:34 -0600 (MDT) To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Richard Guenther Subject: Re: [patch] Fix find_separate_debug_file buffer overrun [Re: gdb crash during read of separate debuginfo] References: <20090802211036.GA28064@host0.dyn.jankratochvil.net> From: Tom Tromey Reply-To: tromey@redhat.com Date: Mon, 03 Aug 2009 16:46:00 -0000 In-Reply-To: <20090802211036.GA28064@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Sun\, 2 Aug 2009 23\:10\:37 +0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-08/txt/msg00027.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: Richard> We experienced crashes when running gdb inside out installation Richard> system which has /usr symlinked to some location beyond /mnt. Richard> The issue is that the code doesn't deal with the case that Richard> the result of lrealpath is longer than its argument. Jan> thanks, posting updated patch for FSF GDB as it is not a Fedora regression. Jan> This attached patch has not been reviewed by Richard Guenther. Jan> 2009-08-02 Richard Guenther Jan> Jan Kratochvil Jan> Fix memory corruption on reread of file through a symbolic link. Jan> * symfile.c (find_separate_debug_file): Initialize CANON_NAME earlier. Jan> Allocate DEBUGFILE with length based on CANON_NAME. Free CANON_NAME on Jan> all the return paths. This looks good to me. Ok. Jan> I do not push much to get the testcase accepted. Is there something in particular you think is wrong with it? It looks ok to me, but your comment makes me wonder what subtlety I missed. Tom