diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-12-13 06:16:04 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-12-13 06:16:04 +0000 |
commit | db13ddbcfa1e8fb7c58a0022893aef8a8921fd4f (patch) | |
tree | 3d7de1b979c3440283d2287579d8a55a44673756 /nptl/allocatestack.c | |
parent | 1b64c27a9ed938cb4a7d26a5d510377f0cacd175 (diff) | |
download | glibc-db13ddbcfa1e8fb7c58a0022893aef8a8921fd4f.tar glibc-db13ddbcfa1e8fb7c58a0022893aef8a8921fd4f.tar.gz glibc-db13ddbcfa1e8fb7c58a0022893aef8a8921fd4f.tar.bz2 glibc-db13ddbcfa1e8fb7c58a0022893aef8a8921fd4f.zip |
* allocatestack.c (allocate_stack): Don't demand that there is an
additional full page available on the stack beside guard, TLS, the
minimum stack.
Diffstat (limited to 'nptl/allocatestack.c')
-rw-r--r-- | nptl/allocatestack.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index 255129a1df..e6bcc2170f 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -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 eventually the thread descriptor. */ guardsize = (attr->guardsize + pagesize_m1) & ~pagesize_m1; - if (__builtin_expect (size < (guardsize + __static_tls_size - + MINIMAL_REST_STACK + pagesize_m1 + 1), + if (__builtin_expect (size < ((guardsize + __static_tls_size + + MINIMAL_REST_STACK + pagesize_m1) + & ~pagesize_m1), 0)) /* The stack is too small (or the guard too large). */ return EINVAL; |