diff options
author | Tad Marshall <tad@10gen.com> | 2012-10-14 17:25:02 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2012-11-06 15:41:18 -0500 |
commit | 7a5f506e0bef86cc0c68e982904fed4f536e1a57 (patch) | |
tree | f1e7c3f18b5830dae618d6f2fc5a0362caf92b3f | |
parent | 8d44b0127a14fb43a41c23c9c75f0b32c98caaa8 (diff) | |
download | mongo-7a5f506e0bef86cc0c68e982904fed4f536e1a57.tar.gz |
SERVER-7352 do not try to exit cleanly in Windows exception handler
In Windows, exit after an access violation the same way we exit on other
platforms after a segfault; with ::_exit(EXIT_ABRUPT).
-rw-r--r-- | src/mongo/db/db.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp index 3bee0908435..3c1daa278b9 100644 --- a/src/mongo/db/db.cpp +++ b/src/mongo/db/db.cpp @@ -1383,14 +1383,11 @@ namespace mongo { printWindowsStackTrace( *excPointers->ContextRecord ); doMinidump(excPointers); - // In release builds, let dbexit() try to shut down cleanly -#if !defined(_DEBUG) - dbexit( EXIT_UNCAUGHT, "unhandled exception" ); -#endif + // Don't go through normal shutdown procedure. It may make things worse. + log() << "*** immediate exit due to unhandled exception" << endl; + ::_exit(EXIT_ABRUPT); - // In debug builds, give debugger a chance to run - if( filtLast ) - return filtLast( excPointers ); + // We won't reach here return EXCEPTION_EXECUTE_HANDLER; } |