libuv/src/unix
Ben Noordhuis d89bd156cf 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>
2019-06-07 09:59:00 +02:00
..
aix-common.c unix: remove unnecessary linebreaks 2018-10-15 14:51:11 -04:00
aix.c unix,win: add uv_get_constrained_memory() 2019-05-15 11:35:05 -04:00
android-ifaddrs.c core: move all include files except uv.h to uv/ 2018-06-14 18:39:32 +02:00
async.c unix: fix race condition in uv_async_send() 2019-04-22 16:22:36 +02:00
atomic-ops.h unix: remove unused cmpxchgl() function 2019-04-11 10:50:19 -04:00
bsd-ifaddrs.c build, core, unix: add support for Haiku 2019-06-07 09:57:06 +02:00
bsd-proctitle.c core,bsd: refactor process_title functions 2018-10-18 10:11:40 +02:00
core.c build, core, unix: add support for Haiku 2019-06-07 09:57:06 +02:00
cygwin.c unix: return 0 retrieving rss on cygwin 2018-09-21 10:51:38 -04:00
darwin-proctitle.c unix: harden string copying, introduce strscpy() 2018-12-04 17:08:09 +01:00
darwin.c unix,win: add uv_get_constrained_memory() 2019-05-15 11:35:05 -04:00
dl.c misc: remove unnecessary null pointer checks 2015-11-17 09:18:55 +01:00
freebsd.c unix,win: add uv_get_constrained_memory() 2019-05-15 11:35:05 -04:00
fs.c build, core, unix: add support for Haiku 2019-06-07 09:57:06 +02:00
fsevents.c unix: fall back to kqueue on older macOS systems 2019-05-15 11:28:19 -04:00
getaddrinfo.c test,sunos: fix statement not reached warnings 2019-03-16 13:22:16 -04:00
getnameinfo.c unix,win: limit concurrent DNS calls to nthreads/2 2018-08-21 10:48:24 +02:00
haiku.c build, core, unix: add support for Haiku 2019-06-07 09:57:06 +02:00
ibmi.c unix,win: add uv_get_constrained_memory() 2019-05-15 11:35:05 -04:00
internal.h darwin: fix thread cancellation fd leak 2019-05-15 12:18:57 -04:00
kqueue.c unix: fall back to kqueue on older macOS systems 2019-05-15 11:28:19 -04:00
linux-core.c linux: fix sscanf() overflows reading from /proc 2019-05-21 09:02:15 -04:00
linux-inotify.c linux: get rid of strncpy() call 2018-12-04 17:08:20 +01:00
linux-syscalls.c unix: don't make statx system call on Android 2019-05-13 21:42:52 -04:00
linux-syscalls.h linux: use statx() to obtain file birth time 2019-02-12 11:16:44 +01:00
loop-watcher.c include,src: introduce UV__ERR() macro 2018-02-08 22:38:02 -05:00
loop.c unix,win: merge handle flags 2018-06-29 22:24:52 +02:00
netbsd.c unix,win: add uv_get_constrained_memory() 2019-05-15 11:35:05 -04:00
no-fsevents.c include,src: introduce UV__ERR() macro 2018-02-08 22:38:02 -05:00
no-proctitle.c include,src: introduce UV__ERR() macro 2018-02-08 22:38:02 -05:00
openbsd.c unix,win: add uv_get_constrained_memory() 2019-05-15 11:35:05 -04:00
os390-syscalls.c zos: use correct pointer type in strnlen 2018-06-29 04:38:28 -07:00
os390-syscalls.h linux: remove epoll syscall wrappers 2018-09-06 13:07:13 +02:00
os390.c unix,win: add uv_get_constrained_memory() 2019-05-15 11:35:05 -04:00
pipe.c udp: add support for UDP connected sockets 2019-03-16 12:05:37 -04:00
poll.c unix: catch some cases of watching fd twice 2018-05-30 13:24:19 +02:00
posix-hrtime.c unix: factor out reusable POSIX hrtime impl 2017-03-03 15:52:42 +01:00
posix-poll.c unix: don't attempt to invalidate invalid fd 2019-02-10 10:11:19 -05:00
process.c build, core, unix: add support for Haiku 2019-06-07 09:57:06 +02:00
procfs-exepath.c include,src: introduce UV__ERR() macro 2018-02-08 22:38:02 -05:00
proctitle.c darwin: speed up uv_set_process_title() 2018-11-04 18:37:56 +01:00
pthread-fixes.c unix: fix bug in barrier fallback implementation 2016-04-26 09:35:47 +02:00
signal.c unix,win: merge handle flags 2018-06-29 22:24:52 +02:00
spinlock.h
stream.c unix,stream: fix zero byte writes 2019-01-17 10:07:14 +01:00
sunos.c unix,win: add uv_get_constrained_memory() 2019-05-15 11:35:05 -04:00
sysinfo-loadavg.c unix: factor out reusable sysinfo loadavg impl 2017-05-21 16:12:16 +02:00
sysinfo-memory.c unix: factor out reusable sysinfo memory lookup 2017-05-21 16:12:14 +02:00
tcp.c unix: refactor getsockname/getpeername methods 2019-03-16 12:05:23 -04:00
thread.c darwin,linux: more conservative minimum stack size 2019-06-07 09:59:00 +02:00
tty.c stream: autodetect direction 2018-09-19 18:19:28 +02:00
udp.c unix: support sockaddr_un in uv_udp_send() 2019-04-11 11:04:43 -04:00