summaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/i386/pt-setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/i386/pt-setup.c')
-rw-r--r--sysdeps/mach/hurd/i386/pt-setup.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/i386/pt-setup.c b/sysdeps/mach/hurd/i386/pt-setup.c
index c3abe91..4511463 100644
--- a/sysdeps/mach/hurd/i386/pt-setup.c
+++ b/sysdeps/mach/hurd/i386/pt-setup.c
@@ -46,7 +46,9 @@ stack_setup (struct __pthread *thread,
/* Calculate the top of the new stack. */
bottom = thread->stackaddr;
- top = (uintptr_t *) ((uintptr_t) bottom + thread->stacksize);
+ top = (uintptr_t *) ((uintptr_t) bottom + thread->stacksize
+ + ((thread->guardsize + __vm_page_size-1)
+ / __vm_page_size) * __vm_page_size);
if (start_routine)
{