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 09:56:27 +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 #3 from Rich Felker <bugdal at aerifal dot cx> ---
The stack is never truly unlimited. There's a finite distance in address space
between the stack and the next adjacent VMA which inherently limits stack
growth. And the kernel only reserved a certain virtual address range in which
new mmaps won't be placed. But interpreting a stack limit of RLIM_INFINITY does
require making assumptions about how the kernel treats it, which might be
invalidated by changes in the kernel. So it's not easy.
Can you clarify why you need to know the max size the stack might grow to,
rather than the currently valid stack range? The latter would be much easier to
obtain, and the former could (I think) become wrong if the application uses
setrlimit between the time the stack size is obtained and the time your code
needs to know it.
--
You are receiving this mail because:
You are on the CC list for the bug.