summaryrefslogtreecommitdiff
path: root/libpthread
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread')
-rw-r--r--libpthread/nptl/allocatestack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpthread/nptl/allocatestack.c b/libpthread/nptl/allocatestack.c
index 9399c2a63..3f0586d28 100644
--- a/libpthread/nptl/allocatestack.c
+++ b/libpthread/nptl/allocatestack.c
@@ -645,7 +645,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
prot) != 0)
goto mprot_error;
#elif defined _STACK_GROWS_UP
- if (mprotect ((char *) pd - pd->guardsize,
+ if (mprotect ((char *) (((uintptr_t) pd - pd->guardsize) & ~pagesize_m1),
pd->guardsize - guardsize, prot) != 0)
goto mprot_error;
#endif