On Sat, Mar 14, 2020 at 9:16 AM Pip Cet wrote: > I don't think it's desirable as default behavior, at this point. It > seems not entirely trivial to get it to work, at least in the case > where system libraries aren't built with -fsplit-stack. It turns out my problems were due to vfork, which doesn't appear to work with -fsplit-stack and non-split-stack libraries. The attached patch works, but it appears the standard behavior of -fsplit-stack is to allocate the stack one page at a time, so it runs into Linux system limits after 128K stack pages (with guard pages). That corresponds to somewhere between 4M and 8M symbols in the linked list, using my test program. To make this work, configure with CFLAGS="-fsplit-stack", edit config.h to define USE_SPLIT_STACK and #define vfork fork. Note that this version marks the entire mapped stack, not just the area that is actually used; that should be easy enough to fix, but it doesn't appear to cause any immediate problems. So, in summary, it's possible to get it to work, but you have to work around the vfork limitation, and it doesn't help all that much because the allocation strategy needs to be adjusted, and even then it would need some extra work not to mark stack areas that were once used but now aren't.