If your program is structured correctly, you can track the maximum possible stack size and eliminate the possibility
I've done it for firmware
I've done it for firmware
Comments
It's hard in the general case, pretty tractable for systems with specific scope.
When I worked in safety critical industries (in C), max stack analysis was more required, but we also had a strict coding standard.
IIRC we banned higher order functions in the crates where we enforced full-binary no-panic