From 880943b6421ba492db6f7027e78390793f07dbb2 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Thu, 24 Oct 2013 08:59:38 +0000 Subject: [PATCH] More documentation updates, regarding the match-leak-kinds: line in auto-generated leak suppressions. git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_9_BRANCH@13691 --- NEWS | 5 +++ memcheck/docs/mc-manual.xml | 76 ++++++++++++++++++++++--------------- 2 files changed, 51 insertions(+), 30 deletions(-) diff --git a/NEWS b/NEWS index 608609f486..467bb94f56 100644 --- a/NEWS +++ b/NEWS @@ -48,6 +48,11 @@ MacOSX 10.8 is significantly improved relative to the 3.8.0 release. --errors-for-leak-kinds=kind1,kind2,.. and an optional "match-leak-kinds:" line in suppression entries, respectively. + Note that generated leak suppressions contain this new line and + are therefore more specific than in previous releases. To get the + same behaviour as previous releases, remove the "match-leak-kinds:" + line from generated suppressions before using them. + - Reduced "possible leak" reports from the leak checker by the use of better heuristics. The available heuristics provide detection of valid interior pointers to std::stdstring, to new[] allocated diff --git a/memcheck/docs/mc-manual.xml b/memcheck/docs/mc-manual.xml index b5276a46aa..a53bf86e99 100644 --- a/memcheck/docs/mc-manual.xml +++ b/memcheck/docs/mc-manual.xml @@ -1158,51 +1158,67 @@ Memcheck:suppression_type]]> information line at this point, which is the name of the offending system call parameter. - -Leak errors have an optional extra -information line. This optional extra information line has the -following format: +Leak errors have an optional +extra information line, with the following format: ]]> where <set> specifies which leak kinds are matched by this suppression entry. -<set> is specified similarly -to the option . -If this optional extra line is not present, the suppression entry will match -all leak kinds. +<set> is specified in the +same way as with the option , that is, +one of the following: + + a comma separated list of one or more of + . + + + to specify the complete set (all leak kinds). + -The other memcheck error kinds do not have extra lines. + for the empty set. + + +If this optional extra line is not present, the suppression +entry will match all leak kinds. + +Be aware that leak suppressions that are created using + will contain this optional extra +line, and therefore may match fewer leaks than you expect. You may +want to remove the line before using the generated +suppressions. + +The other Memcheck error kinds do not have extra lines. If you give the option, Valgrind will print -the list of used suppressions at the end of the execution. +the list of used suppressions at the end of execution. For a leak suppression, this output gives the number of different -loss records that matches the suppression, the number of bytes -and blocks suppressed by the suppressions. -In case several leak searches are done, the number of bytes and blocks -are reset to 0 before a new leak search. Note that the number of different -loss records is not reset to 0. +loss records that match the suppression, and the number of bytes +and blocks suppressed by the suppression. +If the run contains multiple leak checks, the number of bytes and blocks +are reset to zero before each new leak check. Note that the number of different +loss records is not reset to zero. In the example below, in the last leak search, 7 blocks and 96 bytes have -been suppressed by the -suppression. +been suppressed by a suppression with the name +: - -The first line of the calling context: for ValueN -and AddrN errors, it is either the name of the function -in which the error occurred, or, failing that, the full path of the -.so file -or executable containing the error location. For Free errors, is the name -of the function doing the freeing (eg, free, -__builtin_vec_delete, etc). For -Overlap errors, is the name of the function with the -overlapping arguments (eg. memcpy, -strcpy, etc). - -Lastly, there's the rest of the calling context. +For ValueN and AddrN +errors, the first line of the calling context is either the name of +the function in which the error occurred, or, failing that, the full +path of the .so file or executable containing the +error location. For Free errors, the first line is +the name of the function doing the freeing (eg, +free, __builtin_vec_delete, +etc). For Overlap errors, the first line is the name of the +function with the overlapping arguments (eg. +memcpy, strcpy, etc). + +The last part of any suppression specifies the rest of the +calling context that needs to be matched. -- 2.47.2