- std::type_info* exceptionType;
- void (*exceptionDestructor)(void *);
- unexpected_handler unexpectedHandler;
- terminate_handler terminateHandler;
- __cxa_exception* nextException;
-
- int handlerCount;
-
- int handlerSwitchValue;
- const char* actionRecord;
- const char* languageSpecificData;
- void* catchTemp;
- void* adjustedPtr;
-
- _Unwind_Exception unwindHeader;
-};
+ __cxa_exception *ret = static_cast<__cxa_exception*>( malloc( sizeof(__cxa_exception) + thrown_size ) );
+ if( !ret ) {
+ if( thrown_size <= sizeof(emergency_exception.buf) && TEST_AND_SET(emergency_exception_used) )
+ {
+ ret = &emergency_exception.info;
+ }
+ }
+ if( !ret ) {
+ ::std::terminate();
+ }
+ return ret;
+}