From: Stan Shebs <stan@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFC] Detect loops in the solib chain
Date: Thu, 17 Jul 2008 21:07:00 -0000 [thread overview]
Message-ID: <487FB46E.40608@codesourcery.com> (raw)
In-Reply-To: <20080717205721.GA19882@caradoc.them.org>
Daniel Jacobowitz wrote:
> A MontaVista customer had a very interestingly corrupt core file -
> there was a stray pointer in the list of loaded shared libraries. But
> it pointed to something which looked enough like a shared library
> entry to get by, and the bad entry's l_next pointed back at the
> corrupted entry that led to it. So around and around we went, adding
> the same two libraries to the list. When the solib chain reached
> about 2GB, GDB was killed.
>
> The best I could think of was to detect cycles. It's a linked list
> that we're walking, so without cycles we're bounded by the amount of
> memory in the debuggee; it's by no means foolproof, but this should
> prevent more cases of wandering off into the woods than we do now.
>
> Does this look OK? Tested on x86_64-linux, no regressions.
>
What, no test case? :-) Anyway, it looks OK to me.
(You could make a little script to scribble on the executable...)
Stan
next prev parent reply other threads:[~2008-07-17 21:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-17 20:57 Daniel Jacobowitz
2008-07-17 21:07 ` Stan Shebs [this message]
2008-07-17 21:15 ` Thiago Jung Bauermann
2008-07-17 21:42 ` Daniel Jacobowitz
2008-07-17 21:18 ` Paul Pluzhnikov
2008-07-17 21:41 ` Daniel Jacobowitz
2008-07-17 21:57 ` Paul Pluzhnikov
2008-07-17 22:10 ` Daniel Jacobowitz
2008-07-18 23:02 ` Kevin Buettner
2010-04-09 15:41 ` Jan Kratochvil
2010-04-09 21:03 ` Jan Kratochvil
2010-04-12 22:54 ` Kevin Buettner
2010-04-12 23:08 ` Pedro Alves
2010-04-18 20:24 ` OpenSolaris dejagnu workaround [Re: [RFC] Detect loops in the solib chain] Jan Kratochvil
2010-04-23 20:09 ` [RFC] Detect loops in the solib chain Tom Tromey
2010-04-23 21:47 ` Jan Kratochvil
2010-06-11 17:39 ` Ulrich Weigand
2010-06-11 18:34 ` 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=487FB46E.40608@codesourcery.com \
--to=stan@codesourcery.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