diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-05-22 15:49:37 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-05-22 15:49:37 +0000 |
commit | c895a4ef4529edd1ef889b4c283a735b409a958e (patch) | |
tree | fc4b14065ee7ed6ce655aa98252fcc315547f893 /regress | |
parent | 6bf7229cd3b3519f48f66366e6779230c96f6fed (diff) |
On powerpc64 calling a function needs 64 bytes of stack overhead
per recursion. On amd64 it is only 32. Allocate more stack per
thread and the stack tests pass everywhere
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sys/kern/fork-exit/fork-exit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/regress/sys/kern/fork-exit/fork-exit.c b/regress/sys/kern/fork-exit/fork-exit.c index 6295b00b100..737e37ef523 100644 --- a/regress/sys/kern/fork-exit/fork-exit.c +++ b/regress/sys/kern/fork-exit/fork-exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fork-exit.c,v 1.5 2021/05/21 20:42:21 bluhm Exp $ */ +/* $OpenBSD: fork-exit.c,v 1.6 2021/05/22 15:49:36 bluhm Exp $ */ /* * Copyright (c) 2021 Alexander Bluhm <bluhm@openbsd.org> @@ -123,7 +123,7 @@ create_threads(void) if (stack) { /* thread start and function call overhead needs a bit more */ error = pthread_attr_setstacksize(&tattr, - (stack + 2) * (4096 + 32)); + (stack + 2) * (4096 + 64)); if (error) errc(1, error, "pthread_attr_setstacksize"); } @@ -236,7 +236,7 @@ main(int argc, char *argv[]) break; case 's': stack = strtonum(optarg, 0, - (INT_MAX / (4096 + 32)) - 2, &errstr); + (INT_MAX / (4096 + 64)) - 2, &errstr); if (errstr != NULL) errx(1, "number of stack allocations is %s: %s", errstr, optarg); |