From: Sterling Augustine <saugustine@google.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Make interrupting tab-completion safe.
Date: Mon, 13 Jun 2011 17:45:00 -0000 [thread overview]
Message-ID: <BANLkTik1Z5GoCjNP9enPJeLThVk=g9Aj5ZF6zeDULburd2w=bw@mail.gmail.com> (raw)
In-Reply-To: <20110612121158.GA10611@host1.jankratochvil.net>
On Sun, Jun 12, 2011 at 5:11 AM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Sat, 11 Jun 2011 02:19:05 +0200, Sterling Augustine wrote:
>> gdb <really big program>
>> b <tab><tab>
>> [ctrl-c before tab-completion is done]
>> b <tab>
>> (segmentation fault)
>
> I do not have it reproducuble, does not happen for you for ./gdb -nx ./gdb?
> Tried also Firefox, both processing runs long enough to CTRL-C it.
gdb itself isn't big enough to make it easy to reproduce (~24k
symbols). The smallest programs I see this on are about 5x that size
and don't use shared libraries. (Not sure about mozilla, or the
interaction between shared libraries and this.) Certainly, the bigger
the binary, the easier it is to reproduce. If you haven't noticed that
tab-completion (immediately on launch with no init script) is unusably
slow, then the binary probably isn't big enough to trip this bug
easily.
The race is between the conversion from psymtab to full symtab and you
hitting ctrl-c. Some of this time is also spent handling filename
completion, which doesn't have the problem. You need to be sure to
interrupt c_type_print_args, when called from dwarf2read.c:5049.
> It would be good to have a testcase for regressions anyway.
Is there an existing test-case I can model this one on? (One that
sends an asynchronous sigint to gdb is probably enough.) I can't seem
to find any, but my deja-gnu foo is weak.
>> The problem comes because the dwarf2read.c tries to discover the full
>> linkage name of symbols, and assumes that it won't be interrupted.
>
> I had rather an idea to make it interruption-safe as this way another
> forgotten or newly introduced QUIT may regression it. But I do not have
> a reproducer to check where the crash happens.
next prev parent reply other threads:[~2011-06-13 17:45 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-11 0:19 Sterling Augustine
2011-06-12 12:12 ` Jan Kratochvil
2011-06-13 17:45 ` Sterling Augustine [this message]
2011-06-26 22:22 ` [readline patch, gdb-7.3?] Avoid free from a signal handler [Re: [PATCH] Make interrupting tab-completion safe.] Jan Kratochvil
2011-06-27 16:03 ` Joel Brobecker
2011-06-29 21:49 ` Jan Kratochvil
2011-06-29 13:54 ` [Bug-readline] " Chet Ramey
2011-06-29 20:35 ` Jan Kratochvil
2011-06-30 14:38 ` Chet Ramey
2011-07-06 16:03 ` Jan Kratochvil
2011-07-06 16:07 ` Chet Ramey
2011-07-06 17:42 ` Jan Kratochvil
2011-07-07 13:40 ` Chet Ramey
2011-07-08 16:03 ` Chet Ramey
2011-10-19 20:30 ` Jan Kratochvil
2011-10-19 17:02 ` Jan Kratochvil
2011-10-19 17:51 ` Pedro Alves
2011-10-19 18:50 ` Chet Ramey
2011-07-11 18:53 ` [PATCH] Make interrupting tab-completion safe Sterling Augustine
2011-07-11 18:54 ` Jan Kratochvil
[not found] ` <CAEG7qUxFvEoJ-E2YsoFPL-tKoK4kD3-pKn-h31uUeXQoDD2Gaw@mail.gmail.com>
2011-07-12 15:59 ` [dwarf2_mark_helper patch] " Jan Kratochvil
2011-07-12 17:48 ` Sterling Augustine
2011-07-12 18:56 ` Jan Kratochvil
2011-07-12 21:18 ` [commit] " Jan Kratochvil
2011-07-12 21:42 ` Tom Tromey
2011-07-12 22:51 ` Jan Kratochvil
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='BANLkTik1Z5GoCjNP9enPJeLThVk=g9Aj5ZF6zeDULburd2w=bw@mail.gmail.com' \
--to=saugustine@google.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/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