Skip to content

build: set default stack size to 8MB

Simon Zeni requested to merge bl4ckb0ne/monado:musl_stack_size into master

Musl-libc sets the default thread stack size to 128k, where as glibc usually sets it at around 8MB. This causes stack overflows when using the hand tracking driver because of the huge stack allocated arrays.

Fix is to add the flag -Wl,-z,stack-size=8388608 to the linker flags to explicitely set the stack to 8MB (8 * 1024 * 1024)

See https://wiki.musl-libc.org/functional-differences-from-glibc.html#Thread-stack-size

Merge request reports