In the context of a distorted state exception, in general, you can no longer consider anything true. The essence of these exceptions is that something happened, usually due to unmanaged unmanaged code, which violated some basic assumptions about what the Windows or CLR does about the memory structure. This means that, theoretically, the very structures that the CLR uses to track application domains in memory can be damaged. The kinds of things that cause CSE generally indicate that the situation is catastrophically wrong.
Having said all this, regardless of the fact, in some cases, you can make a determination that it is safe to continue with a certain exception. For example, EXCEPTION_STACK_OVERFLOW
can probably be restored, and EXCEPTION_ACCESS_VIOLATION
usually indicates that Windows caught a potential error before it could screw something up. It is up to you if you are willing to take risks, depending on how much you know the code that throws the CSE in the first place.
source share