runtime: panic + recover can cancel a call to Goexit #29226
The documentation for
However, this is empirically not the case if one of the deferred functions itself triggers a
See https://play.golang.org/p/7VrxPDByUNT for a minimal illustration.
Found while investigating #29207.
Panics within panics hurt my brain.
I don't think this would be too hard to fix. We just need another bit in the goroutine to record the "in Goexit" state.
There's a comment in the runtime (from 2014):
So it looks like the current behavior is at least somewhat intentional.