Skip to content

Commit

Permalink
SERVER-4881: Stop defining BOOST_ENABLE_ASSERT_HANDLER.
Browse files Browse the repository at this point in the history
It's correct for assertion failures in boost code to terminate the process,
which is their default behavior.
  • Loading branch information
Andy Schwerin committed Mar 27, 2012
1 parent bf20c28 commit 69db073
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 22 deletions.
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ if has_option( "libpath" ):
if has_option( "cpppath" ):
env["CPPPATH"] = [get_option( "cpppath" )]

env.Prepend( CPPDEFINES=[ "_SCONS" , "MONGO_EXPOSE_MACROS" , "BOOST_ENABLE_ASSERT_HANDLER" ],
env.Prepend( CPPDEFINES=[ "_SCONS" , "MONGO_EXPOSE_MACROS" ],
CPPPATH=[ '$BUILD_DIR', "$BUILD_DIR/mongo" ] )

if has_option( "safeshell" ):
Expand Down
2 changes: 0 additions & 2 deletions src/mongo/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#define MONGO_PCH_H

#if defined(MONGO_EXPOSE_MACROS)
// this is defined in server.h for non-MONGO_EXPOSE_MACROS
# define BOOST_ENABLE_ASSERT_HANDLER 1

# define JS_C_STRINGS_ARE_UTF8
# undef SUPPORT_UCP
Expand Down
2 changes: 0 additions & 2 deletions src/mongo/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# error this file is for mongo server programs not client lib
#endif

#define BOOST_ENABLE_ASSERT_HANDLER 1

#include <map>
#include <vector>
#include <set>
Expand Down
17 changes: 0 additions & 17 deletions src/mongo/util/assert_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,20 +235,3 @@ namespace mongo {
}

}


namespace boost {

void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line) {
mongo::log() << "boost assertion " << expr << ' ' << msg << ' ' << function << ' ' << file << ':' << line << endl;
}


void assertion_failed(char const * expr, char const * function, char const * file, long line) {
mongo::log() << "boost assertion failure " << expr << ' ' << function << ' ' << file << ':' << line << endl;
mongo::fassertFailed( 16108 );
}


}

0 comments on commit 69db073

Please sign in to comment.