This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Quick access to stack bounds
On 12/09/2009 12:23 PM, Roland McGrath wrote:
There are no heuristics, just rlimit constraints.
What could there be? alloca(1<<20) is kosher.
Yes, and that's a problem With unlimited stacks and PROT_GROW* almost
any invalid memory access can be interpreted to belong to a stack. This
is why, I thought, there is something in the kernel to try to
differentiate bogus accesses from extensions.
If you propose a kernel change get rid of PROT_GROWS* at the same time.
What do you have in mind?
As kernel extensions? Richard described the new AT_* constant to tell
userlevel about the stack.
A mapping of RLIMIT_STACK size with a flag about
not precommitting any pages before faulting them in?
I was thinking about completely removing PROT_GROWS*. Nobody has used
it in a decade, I bet.
The remaining issue then would be unlimited stacks.
--
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â