* allocatestack.c (allocate_stack): Don't demand that there is an

additional full page available on the stack beside guard, TLS, the
	minimum stack.
This commit is contained in:
Ulrich Drepper 2005-12-13 06:16:04 +00:00
parent 1b64c27a9e
commit db13ddbcfa
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2005-12-12 Ulrich Drepper <drepper@redhat.com>
* allocatestack.c (allocate_stack): Don't demand that there is an
additional full page available on the stack beside guard, TLS, the
minimum stack.
2005-11-24 Ulrich Drepper <drepper@redhat.com> 2005-11-24 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h

View File

@ -407,8 +407,9 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
/* Make sure the size of the stack is enough for the guard and /* Make sure the size of the stack is enough for the guard and
eventually the thread descriptor. */ eventually the thread descriptor. */
guardsize = (attr->guardsize + pagesize_m1) & ~pagesize_m1; guardsize = (attr->guardsize + pagesize_m1) & ~pagesize_m1;
if (__builtin_expect (size < (guardsize + __static_tls_size if (__builtin_expect (size < ((guardsize + __static_tls_size
+ MINIMAL_REST_STACK + pagesize_m1 + 1), + MINIMAL_REST_STACK + pagesize_m1)
& ~pagesize_m1),
0)) 0))
/* The stack is too small (or the guard too large). */ /* The stack is too small (or the guard too large). */
return EINVAL; return EINVAL;