From: Julian Seward Date: Tue, 26 Dec 2006 03:51:46 +0000 (+0000) Subject: Merge r6382/3 (Fix confusing leak-checker flag hints, and regtest updates) X-Git-Tag: svn/VALGRIND_3_2_2~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3adeb4e022006dc0deb2155a37b4ddb098ac8753;p=thirdparty%2Fvalgrind.git Merge r6382/3 (Fix confusing leak-checker flag hints, and regtest updates) git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_2_BRANCH@6429 --- diff --git a/memcheck/mc_leakcheck.c b/memcheck/mc_leakcheck.c index f194500720..2c4aac4bd9 100644 --- a/memcheck/mc_leakcheck.c +++ b/memcheck/mc_leakcheck.c @@ -928,14 +928,17 @@ void MC_(do_detect_memory_leaks) ( MC_(bytes_reachable), blocks_reachable ); VG_(message)(Vg_UserMsg, " suppressed: %,lu bytes in %,lu blocks.", MC_(bytes_suppressed), blocks_suppressed ); - if (mode == LC_Summary && blocks_leaked > 0) - VG_(message)(Vg_UserMsg, - "Use --leak-check=full to see details of leaked memory."); - else if (!MC_(clo_show_reachable)) { + if (mode == LC_Summary + && (blocks_leaked + blocks_indirect + + blocks_dubious + blocks_reachable) > 0) { + VG_(message)(Vg_UserMsg, + "Rerun with --leak-check=full to see details of leaked memory."); + } + if (blocks_reachable > 0 && !MC_(clo_show_reachable) && mode == LC_Full) { VG_(message)(Vg_UserMsg, "Reachable blocks (those to which a pointer was found) are not shown."); VG_(message)(Vg_UserMsg, - "To see them, rerun with: --show-reachable=yes"); + "To see them, rerun with: --leak-check=full --show-reachable=yes"); } } diff --git a/memcheck/tests/leak-0.stderr.exp b/memcheck/tests/leak-0.stderr.exp index a2233b5c86..adb0de3b4e 100644 --- a/memcheck/tests/leak-0.stderr.exp +++ b/memcheck/tests/leak-0.stderr.exp @@ -8,7 +8,7 @@ LEAK SUMMARY: still reachable: 0 bytes in 1 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 +To see them, rerun with: --leak-check=full --show-reachable=yes ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) malloc/free: in use at exit: 0 bytes in 0 blocks. diff --git a/memcheck/tests/leak-0.stderr.exp2 b/memcheck/tests/leak-0.stderr.exp2 index 6a6d545768..23df1ed370 100644 --- a/memcheck/tests/leak-0.stderr.exp2 +++ b/memcheck/tests/leak-0.stderr.exp2 @@ -9,7 +9,7 @@ LEAK SUMMARY: still reachable: 24 bytes in 2 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 +To see them, rerun with: --leak-check=full --show-reachable=yes ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) malloc/free: in use at exit: 0 bytes in 0 blocks. diff --git a/memcheck/tests/leak-cycle.stderr.exp64 b/memcheck/tests/leak-cycle.stderr.exp64 index e868e67eec..d9e63d8835 100644 --- a/memcheck/tests/leak-cycle.stderr.exp64 +++ b/memcheck/tests/leak-cycle.stderr.exp64 @@ -35,8 +35,6 @@ LEAK SUMMARY: 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 ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) malloc/free: in use at exit: 288 bytes in 18 blocks. diff --git a/memcheck/tests/leak-regroot.stderr.exp b/memcheck/tests/leak-regroot.stderr.exp index 339bfcd92c..dd10b70f2d 100644 --- a/memcheck/tests/leak-regroot.stderr.exp +++ b/memcheck/tests/leak-regroot.stderr.exp @@ -8,7 +8,7 @@ LEAK SUMMARY: still reachable: 10 bytes in 1 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 +To see them, rerun with: --leak-check=full --show-reachable=yes ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) malloc/free: in use at exit: 0 bytes in 0 blocks. diff --git a/memcheck/tests/leak-regroot.stderr.exp2 b/memcheck/tests/leak-regroot.stderr.exp2 index 883322d0da..ee9db446a5 100644 --- a/memcheck/tests/leak-regroot.stderr.exp2 +++ b/memcheck/tests/leak-regroot.stderr.exp2 @@ -9,7 +9,7 @@ LEAK SUMMARY: still reachable: 34 bytes in 2 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 +To see them, rerun with: --leak-check=full --show-reachable=yes ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) malloc/free: in use at exit: 0 bytes in 0 blocks. diff --git a/memcheck/tests/leak-tree.stderr.exp b/memcheck/tests/leak-tree.stderr.exp index e169d28d14..6513420359 100644 --- a/memcheck/tests/leak-tree.stderr.exp +++ b/memcheck/tests/leak-tree.stderr.exp @@ -14,7 +14,7 @@ LEAK SUMMARY: still reachable: 16 bytes in 2 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 +To see them, rerun with: --leak-check=full --show-reachable=yes searching for pointers to 14 not-freed blocks. checked ... bytes. @@ -43,7 +43,7 @@ LEAK SUMMARY: 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 +To see them, rerun with: --leak-check=full --show-reachable=yes ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) malloc/free: in use at exit: 112 bytes in 14 blocks. diff --git a/memcheck/tests/leak-tree.stderr.exp2 b/memcheck/tests/leak-tree.stderr.exp2 index cebd4306e7..cbe995bcb3 100644 --- a/memcheck/tests/leak-tree.stderr.exp2 +++ b/memcheck/tests/leak-tree.stderr.exp2 @@ -13,7 +13,7 @@ LEAK SUMMARY: still reachable: 80 bytes in 10 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 +To see them, rerun with: --leak-check=full --show-reachable=yes searching for pointers to 14 not-freed blocks. checked ... bytes. @@ -42,7 +42,7 @@ LEAK SUMMARY: still reachable: 56 bytes in 7 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 +To see them, rerun with: --leak-check=full --show-reachable=yes ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) malloc/free: in use at exit: 112 bytes in 14 blocks. diff --git a/memcheck/tests/leak-tree.stderr.exp64 b/memcheck/tests/leak-tree.stderr.exp64 index 0e76fa79db..669612716f 100644 --- a/memcheck/tests/leak-tree.stderr.exp64 +++ b/memcheck/tests/leak-tree.stderr.exp64 @@ -14,7 +14,7 @@ LEAK SUMMARY: still reachable: 96 bytes in 6 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 +To see them, rerun with: --leak-check=full --show-reachable=yes searching for pointers to 14 not-freed blocks. checked ... bytes. @@ -43,7 +43,7 @@ LEAK SUMMARY: still reachable: 112 bytes in 7 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 +To see them, rerun with: --leak-check=full --show-reachable=yes ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) malloc/free: in use at exit: 224 bytes in 14 blocks. diff --git a/memcheck/tests/pointer-trace.stderr.exp b/memcheck/tests/pointer-trace.stderr.exp index bdbd960637..158de9c256 100644 --- a/memcheck/tests/pointer-trace.stderr.exp +++ b/memcheck/tests/pointer-trace.stderr.exp @@ -8,7 +8,7 @@ LEAK SUMMARY: still reachable: 1,048,576 bytes in 1 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 +To see them, rerun with: --leak-check=full --show-reachable=yes ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) malloc/free: in use at exit: 1,048,576 bytes in 1 blocks. @@ -26,5 +26,3 @@ LEAK SUMMARY: 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 diff --git a/memcheck/tests/pointer-trace.stderr.exp2 b/memcheck/tests/pointer-trace.stderr.exp2 index b8a91469e1..3f6ec1a027 100644 --- a/memcheck/tests/pointer-trace.stderr.exp2 +++ b/memcheck/tests/pointer-trace.stderr.exp2 @@ -9,7 +9,7 @@ LEAK SUMMARY: still reachable: 1,048,600 bytes in 2 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 +To see them, rerun with: --leak-check=full --show-reachable=yes ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) malloc/free: in use at exit: 1,048,576 bytes in 1 blocks. @@ -29,4 +29,4 @@ LEAK SUMMARY: 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 +To see them, rerun with: --leak-check=full --show-reachable=yes diff --git a/memcheck/tests/pointer-trace.stderr.exp3 b/memcheck/tests/pointer-trace.stderr.exp3 index 3b9851e90b..ce9dba3603 100644 --- a/memcheck/tests/pointer-trace.stderr.exp3 +++ b/memcheck/tests/pointer-trace.stderr.exp3 @@ -8,7 +8,7 @@ LEAK SUMMARY: still reachable: 1,048,576 bytes in 1 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 +To see them, rerun with: --leak-check=full --show-reachable=yes ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) malloc/free: in use at exit: 1,048,576 bytes in 1 blocks. @@ -27,4 +27,4 @@ LEAK SUMMARY: 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 +To see them, rerun with: --leak-check=full --show-reachable=yes diff --git a/memcheck/tests/pointer-trace.stderr.exp64 b/memcheck/tests/pointer-trace.stderr.exp64 index 21a360e119..9eba36ef97 100644 --- a/memcheck/tests/pointer-trace.stderr.exp64 +++ b/memcheck/tests/pointer-trace.stderr.exp64 @@ -8,7 +8,7 @@ LEAK SUMMARY: still reachable: 2,097,152 bytes in 1 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 +To see them, rerun with: --leak-check=full --show-reachable=yes ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) malloc/free: in use at exit: 2,097,152 bytes in 1 blocks. @@ -27,4 +27,4 @@ LEAK SUMMARY: 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 +To see them, rerun with: --leak-check=full --show-reachable=yes