by messe · 4y ago · 0 comments
I’d hazard a guess that the implementation will rely on use-after-free faulting, meaning that the use of any escaped variable will fault rather than corrupting the stack.
Zig has future plans to require recursive functions to declare their maximum stack memory usage up-front, so that will provide the rest.