From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9385 invoked by alias); 29 Nov 2012 16:09:50 -0000 Received: (qmail 9363 invoked by uid 22791); 29 Nov 2012 16:09:48 -0000 X-SWARE-Spam-Status: No, hits=-7.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Nov 2012 16:09:43 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qATG9h01027103 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 29 Nov 2012 11:09:43 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qATG9e8V025390; Thu, 29 Nov 2012 11:09:41 -0500 Message-ID: <50B788C4.60707@redhat.com> Date: Thu, 29 Nov 2012 16:09:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: RFC: really free pending_blocks, v2 References: <87mwy077ny.fsf@fleche.redhat.com> In-Reply-To: <87mwy077ny.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2012-11/txt/msg00873.txt.bz2 On 11/29/2012 03:25 PM, Tom Tromey wrote: > > +/* An obstack used for allocating pending blocks. */ > + > +static struct obstack pending_block_obstack; > + > +/* List of blocks already made (lexical contexts already closed). > + This is used at the end to make the blockvector. */ > + > +struct pending_block > + { > + struct pending_block *next; > + struct block *block; > + }; > + > +/* Pointer to the head of a linked list of symbol blocks which have > + already been finalized (lexical contexts already closed) and which > + are just waiting to be built into a blockvector when finalizing the > + associated symtab. */ > + > +static struct pending_block *pending_blocks; Do we take care of always clearing this before starting a new symtab? What I'm worried about is throwing an error during debug info reading leading to a stale pending_blocks list that gets later added to by mistake, the next time we start another read. -- Pedro Alves