diff --git a/memcheck/mac_leakcheck.c b/memcheck/mac_leakcheck.c index d51d54541..745a7d76e 100644 --- a/memcheck/mac_leakcheck.c +++ b/memcheck/mac_leakcheck.c @@ -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)) { diff --git a/memcheck/mac_needs.c b/memcheck/mac_needs.c index 7342460c7..28a828e65 100644 --- a/memcheck/mac_needs.c +++ b/memcheck/mac_needs.c @@ -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= 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" diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in index 7433b7e80..dfe87f9d0 100755 --- a/tests/vg_regtest.in +++ b/tests/vg_regtest.in @@ -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");