]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Count leak as errors. Fixes bug 152393.
authorNicholas Nethercote <njn@valgrind.org>
Mon, 10 Aug 2009 07:50:00 +0000 (07:50 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Mon, 10 Aug 2009 07:50:00 +0000 (07:50 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10767

coregrind/m_errormgr.c
include/pub_tool_errormgr.h
memcheck/mc_errors.c
memcheck/tests/error_counts.stdout.exp

index 41918357cce03fad73ccca5a8d44b90e50e4fc68..51ed7cf90d36ae2e306ad368e73ed8bb38039531 100644 (file)
@@ -737,11 +737,10 @@ void VG_(maybe_record_error) ( ThreadId tid,
    guaranteed to only happen once.  This avoids all the recording and
    comparing stuff.  But they can be suppressed;  returns True if it is
    suppressed.  Bool 'print_error' dictates whether to print the error. 
-   Bool 'count_error' dictates whether to count the error in n_errs_found.
 */
 Bool VG_(unique_error) ( ThreadId tid, ErrorKind ekind, Addr a, Char* s,
                          void* extra, ExeContext* where, Bool print_error,
-                         Bool allow_db_attach, Bool count_error )
+                         Bool allow_db_attach )
 {
    Error err;
    Supp *su;
@@ -760,8 +759,7 @@ Bool VG_(unique_error) ( ThreadId tid, ErrorKind ekind, Addr a, Char* s,
 
    su = is_suppressible_error(&err);
    if (NULL == su) {
-      if (count_error)
-         n_errs_found++;
+      n_errs_found++;
 
       if (print_error) {
          /* A bit of prettyprinting, to ensure there's a blank line
index a473c6b6416cd1b29dee43285883e0e10ed257f9..01c073e9fcaecbdaa5303a925d491abe355daa8b 100644 (file)
@@ -85,7 +85,7 @@ extern void VG_(maybe_record_error) ( ThreadId tid, ErrorKind ekind,
 extern Bool VG_(unique_error) ( ThreadId tid, ErrorKind ekind,
                                 Addr a, Char* s, void* extra,
                                 ExeContext* where, Bool print_error,
-                                Bool allow_GDB_attach, Bool count_error );
+                                Bool allow_GDB_attach );
 
 /* Gets a non-blank, non-comment line from fd.  bufpp is a pointer to a
    pointer to a buffer that must be allocated with VG_(malloc);  nBufp is a
index f646a9663005979f801906952241fba31a8556c8..d57e8198853acb69ef858a03326119a9050ee59b 100644 (file)
@@ -951,7 +951,7 @@ Bool MC_(record_leak_error) ( ThreadId tid, UInt n_this_record,
    return
    VG_(unique_error) ( tid, Err_Leak, /*Addr*/0, /*s*/NULL, &extra,
                        lr->key.allocated_at, print_record,
-                       /*allow_GDB_attach*/False, /*count_error*/False );
+                       /*allow_GDB_attach*/False );
 }
 
 void MC_(record_user_error) ( ThreadId tid, Addr a,
index 66c8a6492685c504f8a01e2fc4c2fb8251340431..9ad46a128c3b7c2a0242bf00d13f0f8253e8a315 100644 (file)
@@ -12,4 +12,4 @@ dubious:     88 bytes in  1 blocks
 reachable:   99 bytes in  1 blocks
 suppressed:   0 bytes in  0 blocks
 
-errors: 1
+errors: 10