I've posted a proposal to provide an interface for allocating stacks in glibc:
Misc: Add <sys/cstack.h> and the cstack_* family of functions <https://sourceware.org/pipermail/libc-alpha/2021-May/126608.html> This is based on our observation that many applications use static buffers for alternate stacks, which is not thread-safe. I'd appreciate If you could comment here or on libc-alpha based on your experience with alternate signal stacks. Thanks, Florian