This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/16291] feature request: provide simpler ways to compute stack and tls boundaries


https://sourceware.org/bugzilla/show_bug.cgi?id=16291

Rich Felker <bugdal at aerifal dot cx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugdal at aerifal dot cx

--- Comment #1 from Rich Felker <bugdal at aerifal dot cx> ---
Do you want to get the information for the calling thread, or for an arbitrary
target thread? The latter is much harder.

For the main thread, determining its stack extents is difficult and libc really
has nothing to do with it; the kernel is mostly responsible. One end is fixed
and libc could easily record that and provide it, but the moving end is hard to
measure except by the main thread itself where you can just look at the current
value of the stack pointer. Of course one issue is whether you want the
_current_ extents of the stack or the maximum possible extents. Getting the
latter is difficult and may even be impossible under certain conditions where
setrlimit has been used to adjust it during the program's lifetime.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]