]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Default to using --leak-check=summary.
authorNicholas Nethercote <njn@valgrind.org>
Sat, 12 Mar 2005 20:38:13 +0000 (20:38 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Sat, 12 Mar 2005 20:38:13 +0000 (20:38 +0000)
MERGED FROM CVS HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3312

memcheck/mac_leakcheck.c
memcheck/mac_needs.c
tests/vg_regtest.in

index d51d54541ae184fc332d29d36ec8094483b54177..745a7d76e764b2db3b39250a89a5cfb28aee7ef1 100644 (file)
@@ -660,7 +660,7 @@ void MAC_(do_detect_memory_leaks) (
                                MAC_(bytes_reachable), blocks_reachable );
       VG_(message)(Vg_UserMsg, "        suppressed: %d bytes in %d blocks.", 
                                MAC_(bytes_suppressed), blocks_suppressed );
-      if (mode == LC_Summary)
+      if (mode == LC_Summary && blocks_leaked > 0)
         VG_(message)(Vg_UserMsg,
                      "Use --leak-check=full to see details of leaked memory.");
       else if (!MAC_(clo_show_reachable)) {
index 7342460c7a9c02c881a1e0ad11ddc41b3a4d28fb..28a828e65d3401394fef26a0b96370bc1271fd27 100644 (file)
@@ -49,7 +49,7 @@
 
 Bool          MAC_(clo_partial_loads_ok)       = True;
 Int           MAC_(clo_freelist_vol)           = 1000000;
-LeakCheckMode MAC_(clo_leak_check)             = LC_Off;
+LeakCheckMode MAC_(clo_leak_check)             = LC_Summary;
 VgRes         MAC_(clo_leak_resolution)        = Vg_LowRes;
 Bool          MAC_(clo_show_reachable)         = False;
 Bool          MAC_(clo_workaround_gcc296_bugs) = False;
@@ -88,7 +88,7 @@ void MAC_(print_common_usage)(void)
    VG_(printf)(
 "    --partial-loads-ok=no|yes        too hard to explain here; see manual [yes]\n"
 "    --freelist-vol=<number>          volume of freed blocks queue [1000000]\n"
-"    --leak-check=no|summary|full     search for memory leaks at exit? [no]\n"
+"    --leak-check=no|summary|full     search for memory leaks at exit?  [summary]\n"
 "    --leak-resolution=low|med|high   how much bt merging in leak check [low]\n"
 "    --show-reachable=no|yes          show reachable blocks in leak check? [no]\n"
 "    --workaround-gcc296-bugs=no|yes  self explanatory [no]\n"
index 7433b7e805c1022b9215085e2ba2c2ee28d5185d..dfe87f9d0a9418393106c8dea2a9cc31a4e966b1 100755 (executable)
@@ -280,7 +280,7 @@ sub do_one_test($$)
     # Pass the appropriate --tool option for the directory (can be overridden
     # by an "args:" line, though).  
     my $tool=determine_tool();
-    mysystem("VALGRINDLIB=$tests_dir/.in_place $valgrind --command-line-only=yes --tool=$tool $vgopts $prog $args > $name.stdout.out 2> $name.stderr.out");
+    mysystem("VALGRINDLIB=$tests_dir/.in_place $valgrind --command-line-only=yes --memcheck:leak-check=no --addrcheck:leak-check=no --tool=$tool $vgopts $prog $args > $name.stdout.out 2> $name.stderr.out");
 
     if (defined $stdout_filter) {
         mysystem("$stdout_filter < $name.stdout.out > $tmp");