Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Start of work on valgrind test for mongos SERVER-1125

  • Loading branch information...
commit 560b7baafc3183ededabe99a65510ee1f39ac385 1 parent a6e5b14
@RedBeard0531 RedBeard0531 authored
Showing with 19 additions and 0 deletions.
  1. +1 −0  SConstruct
  2. +10 −0 shell/utils.cpp
  3. +8 −0 valgrind.suppressions
View
1  SConstruct
@@ -681,6 +681,7 @@ if nix:
if debugBuild:
env.Append( CPPFLAGS=" -O0 -fstack-protector " );
+ env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind
else:
env.Append( CPPFLAGS=" -O3" )
View
10 shell/utils.cpp
@@ -229,6 +229,16 @@ namespace mongo {
boost::filesystem::path programPath = program;
if (isMongoProgram){
+#if 0
+ if (program == "mongos") {
+ argv_.push_back("valgrind");
+ argv_.push_back("--leak-check=yes");
+ argv_.push_back("--suppressions=valgrind.suppressions");
+ //argv_.push_back("--error-exitcode=1");
+ argv_.push_back("--");
+ }
+#endif
+
programPath = boost::filesystem::initial_path() / programPath;
#ifdef _WIN32
programPath = change_extension(programPath, ".exe");
View
8 valgrind.suppressions
@@ -0,0 +1,8 @@
+{
+ Command_Static_Stuff
+ Memcheck:Leak
+ ...
+ fun:_ZNSsC1EPKcRKSaIcE
+ ...
+}
+
Please sign in to comment.
Something went wrong with that request. Please try again.