What is 0xC00002B4

 
Previous Next
STATUS_CANT_ENABLE_DENY_ONLY STATUS_FLOAT_MULTIPLE_TRAPS

STATUS_FLOAT_MULTIPLE_FAULTS

If an exception “division by zero” was arose on SSE instructions (e.g. by divss) Windows sends to handler exception message STATUS_FLOAT_MULTIPLE_TRAPS (0xc00002b5). The question is – how could handler recognize kind of the exception which is really arose – (division by zero, invalid, …). The same question there is for “underflow” exception, Windows sends to handler exception message STATUS_FLOAT_MULTIPLE_FAULTS (0xc00002b4). The MSDN description for exception messages STATUS_FLOAT_MULTIPLE_TRAPS and STATUS_FLOAT_MULTIPLE_FAULTS very poor. In the structure CONTEXT (from winnt.h) there is no information about MXCSR register so there is no way to recognize kind of exception manually.

Handle Exceptions on Windows

On Windows, an exception is an event that occurs during the execution of a program. There are two kinds of exceptions: hardware exceptions and software exceptions. Hardware exceptions are comparable to signals such as SIGSEGV and SIGKILL on Oracle Solaris and Linux operating systems. Software exceptions are initiated explicitly by applications or the operating system using the RaiseException() API.

On Windows, the mechanism for handling both hardware and software exceptions is called structured exception handling (SEH). This is stack frame-based exception handling similar to the C++ and Java exception handling mechanism. In C++ the __try and __except keywords are used to guard a section of code that might result in an exception, as shown in Example below

__try { // guarded body of code } __except (filter-expression) { // exception-handler block }

The __except block is filtered by a filter expression that uses the integer exception code returned by the GetExceptionCode() API, exception information returned by the GetExceptionInformation() API, or both. The filter expression should evaluate to one of the following values:

EXCEPTION_CONTINUE_EXECUTION = -1

The filter expression has repaired the situation, and execution continues where the exception occurred. Unlike some exception schemes, SEH supports the resumption model as well. This is much like Unix signal handling in the sense that after the signal handler finishes, the execution continues where the program was interrupted. The difference is that the handler in this case is just the filter expression itself and not the __except block. However, the filter expression might also involve a function call.

EXCEPTION_CONTINUE_SEARCH = 0

The current handler cannot handle this exception. Continue the handler search for the next handler. This is similar to the catch block not matching an exception type in C++ and Java.

EXCEPTION_EXECUTE_HANDLER = 1

The current handler matches and can handle the exception. The __except block is executed.

The __try and __finally keywords are used to construct a termination handler as shown in Example below:

__try { // guarded body of code } __finally { // __finally block }