summaryrefslogtreecommitdiff
path: root/src/mongo/util/stacktrace.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/stacktrace.cpp')
-rw-r--r--src/mongo/util/stacktrace.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mongo/util/stacktrace.cpp b/src/mongo/util/stacktrace.cpp
index c1348a00240..4cfafe2fa01 100644
--- a/src/mongo/util/stacktrace.cpp
+++ b/src/mongo/util/stacktrace.cpp
@@ -13,6 +13,8 @@
* limitations under the License.
*/
+#include "mongo/platform/basic.h"
+
#include "mongo/util/stacktrace.h"
#include <cstdlib>
@@ -22,13 +24,13 @@
#include <vector>
#include "mongo/util/log.h"
+#include "mongo/util/concurrency/mutex.h"
#ifdef _WIN32
#include <boost/filesystem/operations.hpp>
#include <boost/smart_ptr/scoped_array.hpp>
#include <sstream>
#include <stdio.h>
-#include "mongo/platform/windows_basic.h"
#include <DbgHelp.h>
#include "mongo/util/assert_util.h"
#else
@@ -274,13 +276,13 @@ namespace mongo {
}
}
- // Print error message from C runtime followed by stack trace
+ // Print error message from C runtime, then fassert
int crtDebugCallback(int, char* originalMessage, int*) {
StringData message(originalMessage);
log() << "*** C runtime error: "
- << message.substr(0, message.find('\n')) << std::endl;
- printStackTrace();
- return 1; // 0 == not handled, non-0 == handled
+ << message.substr(0, message.find('\n'))
+ << ", terminating" << std::endl;
+ fassertFailed( 17006 );
}
}