From: Tom Tromey <tromey@redhat.com>
To: fche@redhat.com (Frank Ch. Eigler)
Cc: gdb-patches@sourceware.org
Subject: Re: FYI: put a QUIT in DWARF expression evaluator
Date: Tue, 19 Jul 2011 20:26:00 -0000 [thread overview]
Message-ID: <m3r55m2iiv.fsf@fleche.redhat.com> (raw)
In-Reply-To: <y0mmxgosets.fsf@fche.csb> (Frank Ch. Eigler's message of "Fri, 08 Jul 2011 16:22:07 -0400")
Sorry about the delay on this.
Tom> Today I wondered what would happen if I modified pr10770.c to fail,
Tom> causing an infinite loop while evaluating a DWARF expression. The
Tom> answer is that gdb hangs and I had to kill it from the shell.
Tom> [...]
Tom> FWIW, as far as I know, no such DWARF has ever been found in the wild.
Frank> But perhaps other non-interactive services that rely on gdb to do
Frank> backtraces (pstack?) could be tricked into looping indefinitely. To
Frank> what extent is gdb vulnerable to specially crafted target memory state
Frank> causing indefinitely-long processing?
I wouldn't trust it, that's for sure. I don't know of specific bugs,
but dwarf2read is simply too large and complicated for me to believe
that it is free of problems.
I would not be averse to putting a large-enough artificial limit on the
expression evaluator. It is hard to imagine a legitimate DWARF
expression needing more than 1000 operations or something like that.
Tom
prev parent reply other threads:[~2011-07-19 19:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-08 19:54 Tom Tromey
2011-07-09 6:40 ` Frank Ch. Eigler
2011-07-19 20:26 ` Tom Tromey [this message]
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=m3r55m2iiv.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=fche@redhat.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