i386 backtrace() question
David Mosberger
davidm@napali.hpl.hp.com
Thu Aug 19 11:47:00 GMT 2004
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?
Thanks,
--david
More information about the Libc-hacker
mailing list