Fixed rounding bug in the stack info calculation when we don't have
pthread_getattr_np.
diff --git a/loader/pthread.c b/loader/pthread.c
index e750843..af3386f 100644
--- a/loader/pthread.c
+++ b/loader/pthread.c
@@ -72,8 +72,8 @@
#else
/* assume that the stack allocation is page aligned */
char dummy;
- size_t page_mask = getpagesize() - 1;
- char *stack_top = (char *)((unsigned long)(&dummy + page_mask) & ~page_mask);
+ size_t page_size = getpagesize();
+ char *stack_top = (char *)((unsigned long)&dummy & ~(page_size - 1)) + page_size;
info->stack_base = stack_top - info->stack_size;
#endif
}