Memory management in C programs (2014)
I&#x27;m going to claim that the problem being solved here fundamentally comes from attempting to shoehorn early exit into an ancient codebase that wasn&#x27;t designed for it, via longjmp.  Exceptions can be a handy language feature, but plenty of modern code written in languages like C++ (whose exception support is often eschewed) and Go gets by without them.  It just has to be written so that most functions manually propagate error codes they receive, potentially after manually unwinding some core state.  C code can be written that way too: the manual cleanup that must be written then extends to mundane buffer freeing, but that&#x27;s a tractable and local requirement; no need for complicated global reasoning around static buffers and custom allocation schemes.