Re:Stack size invisibility in C and the effects on "portabil...
by DrJokepu on Tuesday September 28, 2021 @10:47AM
(#28683448)
This is speculation, but maybe it catches unintended infinite recursion earlier? Iām willing to bet that the vast majority of stack overflows happen due to programming errors rather than genuine uses running out of stack.
[ Parent
| on HN ]
Re:Stack size invisibility in C and the effects on "portabil...
by projektfu on Tuesday September 28, 2021 @05:56PM
(#28688003)
This is the best answer I could think of. We have to assume the question is about Alpine Linux, not about embedded systems per se. Small thread stacks run out of space quickly (fail fast), help prevent a malicious process from gobbling up lots of VM, and force you to program in a style that doesn't use much stack space, although that's questionable because most memory leaks are heap-based.
It's worth noting that the limits are adjustable on a per-package basis in Alpine based on the compiler-time link options.