From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19835 invoked by alias); 7 Apr 2012 21:46:15 -0000 Received: (qmail 19826 invoked by uid 22791); 7 Apr 2012 21:46:15 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,TVD_SUBJ_NUM_OBFU_MINFP X-Spam-Check-By: sourceware.org Received: from shell4.bayarea.net (HELO shell4.bayarea.net) (209.128.82.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 07 Apr 2012 21:46:02 +0000 Received: (qmail 8885 invoked from network); 7 Apr 2012 14:46:01 -0700 Received: from c-76-102-3-160.hsd1.ca.comcast.net (HELO redwood.eagercon.com) (76.102.3.160) by shell4.bayarea.net with SMTP; 7 Apr 2012 14:46:01 -0700 Message-ID: <4F80B598.9050606@eagerm.com> Date: Sat, 07 Apr 2012 21:46:00 -0000 From: Michael Eager User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 MIME-Version: 1.0 To: Doug Evans CC: gdb-patches@sourceware.org Subject: Re: [commit] dwarf2read.c (load_partial_dies): Change condition to assert. References: <20120407193915.4B21224618E@ruffy.mtv.corp.google.com> <4F80A628.7050304@eagerm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; 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: 2012-04/txt/msg00118.txt.bz2 On 04/07/2012 01:49 PM, Doug Evans wrote: > On Sat, Apr 7, 2012 at 1:40 PM, Michael Eager wrote: >> On 04/07/2012 12:39 PM, Doug Evans wrote: >>> >>> Hi. >>> >>> There's no caller where cu->per_cu == NULL, >>> and I'd rather have the assert. >> >> Per_cu data is flushed asynchronously in free_heap_comp_unit() >> and free_stack_comp_unit(). Are you sure that this can't happen? > > Define "asynchronously". age_cached_comp_units() is called to age the CU cache and free up cached CUs which were not recently used. This happens while reading symbols for a different CU. > My reading of all of the callers says it can't happen (modulo bugs of course). > I could have missed something of course (in which case let's get > something added to the testsuite to exercise the appropriate code > path). My concern is that unless the per_cu data was loaded by one of the immediate callers, it may have been flushed. I'm not sure I can create a reasonable test case for this problem. I ran into this with a large program with many CUs printing a struct which took several pages to print. The per_cu data disappeared in the middle of printing the struct. -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077