Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Eager <eager@eagerm.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [commit] dwarf2read.c (load_partial_dies): Change condition to assert.
Date: Sat, 07 Apr 2012 21:46:00 -0000	[thread overview]
Message-ID: <4F80B598.9050606@eagerm.com> (raw)
In-Reply-To: <CADPb22RxBvtz_AAUcgMShYQFE1cBMMkd0=E-kRBMMyodnKiwRA@mail.gmail.com>

On 04/07/2012 01:49 PM, Doug Evans wrote:
> On Sat, Apr 7, 2012 at 1:40 PM, Michael Eager<eager@eagerm.com>  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


  reply	other threads:[~2012-04-07 21:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-07 19:39 Doug Evans
2012-04-07 20:40 ` Michael Eager
2012-04-07 20:49   ` Doug Evans
2012-04-07 21:46     ` Michael Eager [this message]
2012-04-07 22:14       ` Doug Evans
2012-04-07 22:27         ` Michael Eager

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F80B598.9050606@eagerm.com \
    --to=eager@eagerm.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox