What is a "double stack error"?

I recently read the following about Windows exception handling.

In some unhandled exceptions, such as a double stack error, the operating system will immediately terminate the application without calling the unhandled exception filter or JIT debugger.

What is a double stack error? How does it differ from a regular stack error?

+7
source share
1 answer

This phrase probably came from this Codeproject article. This site is not well known for a technical review. The true meaning of a “double error” is associated with the kernels of the operating system, you get a double error when the kernel error handler itself, which responds to user mode itself, suffers from an error. Which is fatal and causes a kernel panic. Blue screen in windows. In addition, something that exists in the processors, the x86 core stops executing code when it suffers from a “triple error”.

Nothing wrong here, what he wanted to describe in his article is a condition when a program bombes due to and code that works in response to a failure, for example, registered in UnhandledExceptionFilter (), consumes the last bit of the stack that Windows gives the stream to try to recover from SO. This is not so much, 8192 bytes (two pages) with less than 7080 bytes. If such a code consumes this reserve, the show ceases, further function calls cannot be performed. The kernel causes an access violation and unconditionally terminates the process.

This small reserve is also the reason that managed code cannot sustain SO, the CLR requires too much stack space to reflect the exception, and therefore immediately terminates the program without trying. Here is a general cover article on the defense pages, the underlying mechanism .

+7
source

All Articles