All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Fleming <matt@console-pimps.org>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, Adam Jiang <jiang.adam@gmail.com>
Subject: Re: How to detect STACKOVEFLOW on mips
Date: Wed, 30 Jun 2010 22:57:41 +0100	[thread overview]
Message-ID: <87zkycyyi2.fsf@linux-g6p1.site> (raw)
In-Reply-To: <20100630145006.GA31938@linux-mips.org>

On Wed, 30 Jun 2010 15:50:06 +0100, Ralf Baechle <ralf@linux-mips.org> wrote:
> 
> There used to be some code for other architectures that zeros the stack
> page and counts how much of that has been overwritten by the stack.  That
> was never ported to MIPS.
> 
> Another helper to find functions that do excessive static allocations is
> "make checkstack".

Both SH and sparc use the mcount function (enabled with the -pg switch
to gcc) to check the stack has not overflowed. The relevant code is in
arch/{sh,sparc}/lib/mcount.S. This checks the stack pointer value on
every function call. Yeah, it's heavy-weight, but an implementation for
MIPS should be able to catch almost the exact point at which stack
overflow occurs.

  reply	other threads:[~2010-06-30 21:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-30  5:59 How to detect STACKOVEFLOW on mips Adam Jiang
2010-06-30 14:27 ` Phil Staub
2010-06-30 14:57   ` Ralf Baechle
2010-06-30 18:16   ` David VomLehn
2010-06-30 22:13     ` Maciej W. Rozycki
2010-06-30 14:50 ` Ralf Baechle
2010-06-30 21:57   ` Matt Fleming [this message]
2010-07-05 10:56     ` Ralf Baechle
2010-07-05 13:09       ` Matt Fleming
2010-07-05 13:35         ` Ralf Baechle
2010-07-05 14:08           ` Matt Fleming

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=87zkycyyi2.fsf@linux-g6p1.site \
    --to=matt@console-pimps.org \
    --cc=jiang.adam@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.