aboutsummaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2019-06-07 09:58:49 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2019-06-07 09:59:00 +0200
commitd89bd156cfc9f66003a430c31149c4b94e18b904 (patch)
treeea2dccaff1eb2216d723c90fd1f6a17af872eade /docs/src
parentabe4f3d58d1f89f7b9c3092a917486832ceff7a2 (diff)
downloadlibuv-d89bd156cfc9f66003a430c31149c4b94e18b904.tar.gz
libuv-d89bd156cfc9f66003a430c31149c4b94e18b904.zip
darwin,linux: more conservative minimum stack size
uv_thread_create() inspects min(PTHREAD_STACK_MIN, RLIMIT_STACK) to find out the minimum allowed stack size. After spelunking through kernel and libc code, I came to the conclusion that allowing such small stacks does not mix well with signals. Musl's PTHREAD_STACK_MIN is 2 KB but signal handlers on many architectures need at least 1 KB to store the signal context, making it almost impossible to do anything on the thread without signal delivery overflowing the stack. Therefore, increase the lower bound to 8 KB. That corresponds to PTHREAD_STACK_MIN + MINSIGSTKSZ on arm64, which has the largest MINSIGSTKSZ of the architectures that musl supports. PR-URL: https://github.com/libuv/libuv/pull/2310 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Diffstat (limited to 'docs/src')
0 files changed, 0 insertions, 0 deletions