18 ms·
Depends on your definition of graceful but the C standard doesn't preclude handling it and there's POSIX interfaces such as sigaltstack / sigsetjmp etc that fit
by fulafel 10mo ago
Depends on your definition of graceful but the C standard doesn't preclude handling it and there's POSIX interfaces such as sigaltstack / sigsetjmp etc that fit and indeed some code like language runtimes use this to react to stack exhaustion (having first set up guard pages etc).
- kibwen 10mo agoOr in short: no, C is no better than Rust at gracefully recovering from stack overflow, either in theory or in practice.
- deleted 10mo ago[deleted]