mmap18: Increase minimal stack mapping to PTHREAD_STACK_MIN
PATCH v2 1/1 mmap18: Increase minimal stack mapping to PTHREAD_STACK_MIN
The first testcase keeps segfaulting on older kernels with only 4KB initial stack mapping. Pthread man pages say that stack must be at least PTHREAD_STACK_MIN bytes in size but they're not clear how that relates to growing stacks. Let's be on the safe side.
Signed-off-by Martin Doucha <[email protected]>
---
Changes since v1: Use PTHREAD_STACK_MIN as the minimum instead of 8KB
testcases/kernel/syscalls/mmap/mmap18.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/syscalls/mmap/mmap18.c +2 -2
@@ -202,9 +202,9 @@ static void run_test(void) {size_t stack_size =8 *PTHREAD_STACK_MIN ; -grow_stack_success (stack_size, page_size); +grow_stack_success (stack_size,PTHREAD_STACK_MIN );grow_stack_success (stack_size, stack_size/2 ); -grow_stack_fail (stack_size, page_size); +grow_stack_fail (stack_size,PTHREAD_STACK_MIN );grow_stack_fail (stack_size, stack_size/2 ); }
Signature · 1 line
2.28.0
PATCH v2 1/1 mmap18: Increase minimal stack mapping to PTHREAD_STACK_MIN
Hi!
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]