This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/16291] feature request: provide simpler ways to compute stack and tls boundaries
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 04 Dec 2013 17:33:31 +0000
- Subject: [Bug libc/16291] feature request: provide simpler ways to compute stack and tls boundaries
- Auto-submitted: auto-generated
- References: <bug-16291-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16291
--- Comment #9 from Rich Felker <bugdal at aerifal dot cx> ---
The identity of the current thread does not depend on the current stack
address. You can get it with pthread_self(), or perhaps even via inspecting the
thread pointer register (or similar arch-specific mechanism) directly. Note
that even the stack range provided by pthread_getattr_np or some proposed new
mechanism is not sufficient to get all possible stack addresses the thread
might run on, since sigaltstack may be used for signal handlers which run in
the thread. (There's also GCC's split-stack nonsense but I'm assuming
everybody's already realized that was a horrible idea and given up on using
it...)
--
You are receiving this mail because:
You are on the CC list for the bug.