3 ms·
> I had to keep a stack of jmp_bufs and manually jump to each one, which would be in a function where memory had to be cleaned up. This is similar to (but not
by pjc50 3y ago
> I had to keep a stack of jmp_bufs and manually jump to each one, which would be in a function where memory had to be cleaned up.
This is similar to (but not identical to) what Windows calls "structured exception handling" (SEH), which allows you to intercept things like "divide by zero" and do unwinding. https://learn.microsoft.com/en-us/cpp/cpp/structured-exception-handling-c-cpp?view=msvc-170 https://learn.microsoft.com/en-us/cpp/cpp/structured-excepti...
- gavinhoward 3y agoYes. I considered using SEH for my bc on Windows (I ported it to Windows), but decided against it because I wasn't sure I understood SEH enough.