Go's defer and panic: Open-Coded Defers and the Runtime's Unwind Loop
Go compiles a defer three different ways depending on where it appears, and the panic runtime unwinds those three shapes separately.
Go compiles a defer three different ways depending on where it appears, and the panic runtime unwinds those three shapes separately.