|
From: Nicholas N. <nj...@ca...> - 2003-12-02 10:18:15
|
CVS commit by nethercote:
Make --leak-check observe -q properly -- only prints out errors, not general
info and summaries.
MERGE TO STABLE
M +23 -19 mac_leakcheck.c 1.11
M +0 -11 tests/nanoleak.stderr.exp 1.9
M +0 -11 tests/nanoleak_supp.stderr.exp 1.3
M +0 -11 tests/trivialleak.stderr.exp 1.8
--- valgrind/memcheck/mac_leakcheck.c #1.10:1.11
@@ -422,5 +422,7 @@ void MAC_(do_detect_memory_leaks) (
}
- VG_(message)(Vg_UserMsg, "searching for pointers to %d not-freed blocks.",
+ if (VG_(clo_verbosity) > 0)
+ VG_(message)(Vg_UserMsg,
+ "searching for pointers to %d not-freed blocks.",
lc_n_shadows );
@@ -442,4 +444,5 @@ void MAC_(do_detect_memory_leaks) (
);
+ if (VG_(clo_verbosity) > 0)
VG_(message)(Vg_UserMsg, "checked %d bytes.", bytes_notified);
@@ -527,4 +530,5 @@ void MAC_(do_detect_memory_leaks) (
}
+ if (VG_(clo_verbosity) > 0) {
VG_(message)(Vg_UserMsg, "");
VG_(message)(Vg_UserMsg, "LEAK SUMMARY:");
@@ -543,5 +547,5 @@ void MAC_(do_detect_memory_leaks) (
"To see them, rerun with: --show-reachable=yes");
}
- VG_(message)(Vg_UserMsg, "");
+ }
VG_(free) ( lc_shadows );
--- valgrind/memcheck/tests/nanoleak.stderr.exp #1.8:1.9
@@ -1,15 +1,4 @@
-searching for pointers to 1 not-freed blocks.
-checked ... bytes.
1000 bytes in 1 blocks are definitely lost in loss record 1 of 1
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: main (nanoleak.c:6)
-
-LEAK SUMMARY:
- definitely lost: 1000 bytes in 1 blocks.
- possibly lost: 0 bytes in 0 blocks.
- still reachable: 0 bytes in 0 blocks.
- suppressed: 0 bytes in 0 blocks.
-Reachable blocks (those to which a pointer was found) are not shown.
-To see them, rerun with: --show-reachable=yes
-
--- valgrind/memcheck/tests/nanoleak_supp.stderr.exp #1.2:1.3
@@ -1,11 +0,0 @@
-searching for pointers to 1 not-freed blocks.
-checked ... bytes.
-
-LEAK SUMMARY:
- definitely lost: 0 bytes in 0 blocks.
- possibly lost: 0 bytes in 0 blocks.
- still reachable: 0 bytes in 0 blocks.
- suppressed: 1000 bytes in 1 blocks.
-Reachable blocks (those to which a pointer was found) are not shown.
-To see them, rerun with: --show-reachable=yes
-
--- valgrind/memcheck/tests/trivialleak.stderr.exp #1.7:1.8
@@ -1,4 +1,2 @@
-searching for pointers to 1000 not-freed blocks.
-checked ... bytes.
1000 bytes in 1000 blocks are definitely lost in loss record 1 of 1
@@ -6,11 +4,2 @@
by 0x........: test (trivialleak.c:8)
by 0x........: main (trivialleak.c:12)
-
-LEAK SUMMARY:
- definitely lost: 1000 bytes in 1000 blocks.
- possibly lost: 0 bytes in 0 blocks.
- still reachable: 0 bytes in 0 blocks.
- suppressed: 0 bytes in 0 blocks.
-Reachable blocks (those to which a pointer was found) are not shown.
-To see them, rerun with: --show-reachable=yes
-
|