The current implementation uses CrashRecoveryContext, but this only supports recovering in a certain number of cases. This revision adds a signal handler to support even more situations.
This revision was able to properly generate a reproducer for a segfault in the Inliner, that the current recovery couldn't.
Depends On D78314
So this seems to enforce that we always delete the stack of RecoveryReproducerContext in the order in which they were created, how does it happen? If multiple threads from the application are running different PassManagers for example?