From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30999 invoked by alias); 19 Aug 2004 20:56:06 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 30983 invoked from network); 19 Aug 2004 20:56:06 -0000 Received: from unknown (HELO gateway.sf.frob.com) (64.81.54.130) by sourceware.org with SMTP; 19 Aug 2004 20:56:06 -0000 Received: from magilla.sf.frob.com (magilla.sf.frob.com [198.49.250.228]) by gateway.sf.frob.com (Postfix) with ESMTP id C9D11357B; Thu, 19 Aug 2004 13:56:04 -0700 (PDT) Received: from magilla.sf.frob.com (localhost.localdomain [127.0.0.1]) by magilla.sf.frob.com (8.12.11/8.12.9) with ESMTP id i7JKu4wK024913; Thu, 19 Aug 2004 13:56:04 -0700 Received: (from roland@localhost) by magilla.sf.frob.com (8.12.11/8.12.11/Submit) id i7JKu4Hv024910; Thu, 19 Aug 2004 13:56:04 -0700 Date: Thu, 19 Aug 2004 20:56:00 -0000 Message-Id: <200408192056.i7JKu4Hv024910@magilla.sf.frob.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable From: Roland McGrath To: davidm@hpl.hp.com Cc: libc-hacker@sources.redhat.com Subject: Re: i386 backtrace() question In-Reply-To: David Mosberger's message of Thursday, 19 August 2004 04:47:31 -0700 <16676.37715.609457.479566@napali.hpl.hp.com> X-Windows: the first fully modular software disaster. X-SW-Source: 2004-08/txt/msg00063.txt.bz2 > While tracking down an unrelated libunwind failure on x86, I came > across this curious test in sysdeps/i386/backtrace.c: >=20 > if ((void *) current < esp || (void *) current > __libc_stack_end) >=20 > 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 =2E