Re:Banned C standard library functions in Git source code
by userbinator on Sunday August 25, 2019 @01:57PM
(#20794410)
The destination of the goto is usually the clean-up code.
[ Parent
| on HN ]
Re:Banned C standard library functions in Git source code
by johannes1234321 on Sunday August 25, 2019 @06:46PM
(#20796116)
That's nice for the single frame.
Let's take the example of PostgreSQL, which was mentioned in this thread: A potential implementation (I have no knowledge of pgsql internals) might be that for a single user session all memory is from a single arena, all locks and other handles are tied to the session handle, then it can be an efficient strategy to longjmp out on a critical error (i.e. IO error) and clean the arena as well as things tied to the session. instead of bubbling this up through all frames.