public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: davidm@hpl.hp.com
Cc: libc-hacker@sources.redhat.com
Subject: Re: i386 backtrace() question
Date: Thu, 19 Aug 2004 20:56:00 -0000	[thread overview]
Message-ID: <200408192056.i7JKu4Hv024910@magilla.sf.frob.com> (raw)
In-Reply-To: David Mosberger's message of  Thursday, 19 August 2004 04:47:31 -0700 <16676.37715.609457.479566@napali.hpl.hp.com>

> While tracking down an unrelated libunwind failure on x86, I came
> across this curious test in sysdeps/i386/backtrace.c:
> 
>       if ((void *) current < esp || (void *) current > __libc_stack_end)
> 
> The test is obvous for non-threaded programs.  However, I'd like to
> confirm that the test is OK for multi-threaded programs as well,
> because all thread stacks will be allocated below __libc_stack_end.
> I'm pretty sure that's true for Linux, though I'm uncertain about how
> stack-randomization or other OSes would affect the validity of the
> test.  Could somebody confirm?

This is the case on Linux with all kernels I'm aware of.  It's not true on
GNU/Hurd, where the stack can be anywhere (it's just a vanilla allocation
like an mmap).


Thanks,
Roland
.

      reply	other threads:[~2004-08-19 20:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-19 11:47 David Mosberger
2004-08-19 20:56 ` Roland McGrath [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=200408192056.i7JKu4Hv024910@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=davidm@hpl.hp.com \
    --cc=libc-hacker@sources.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).