I've quickly skimmed through it, but when reading it thought about he's gonna handle alloca() (and later I've read dynamic arrays).
So the solution is to dynamically allocate them, and at the end of stack routine free them. That's all good, but what if you longjmp() and have alloca() function still allocated. That would leak... Unless unwinding is done, and RAII kind of type for alloca is made. (Or maybe wrap alloca in C++ RAII, or maybe that's what the compiler would be doing).
So the solution is to dynamically allocate them, and at the end of stack routine free them. That's all good, but what if you longjmp() and have alloca() function still allocated. That would leak... Unless unwinding is done, and RAII kind of type for alloca is made. (Or maybe wrap alloca in C++ RAII, or maybe that's what the compiler would be doing).