Re:Making robust software: the “Mars Code” talk (2012)
by ktRolster on Monday February 15, 2016 @11:14AM
(#11104104)
You can prove that you won't have a stack overflow. You can calculate the maximum depth of the stack at compile time, not runtime.
[ Parent
| on HN ]
Re:Making robust software: the “Mars Code” talk (2012)
by marcosdumay on Monday February 15, 2016 @03:14PM
(#11105609)
Well, you can either prove that you won't have a stack overflow at the original program, or you can not guarantee that your new code will run out of stack space.
If you can calculate the size of the stack at compile time, you don't need to manually manage it.
Re:Making robust software: the “Mars Code” talk (2012)
by dclowd9901 on Monday February 15, 2016 @11:23AM
(#11104159)
Can't you also just pass a bit through the recursion that contains its depth, and halt the recursion if that number gets too high?