|
From: <sv...@va...> - 2009-08-10 07:50:11
|
Author: njn
Date: 2009-08-10 08:50:00 +0100 (Mon, 10 Aug 2009)
New Revision: 10767
Log:
Count leak as errors. Fixes bug 152393.
Modified:
trunk/coregrind/m_errormgr.c
trunk/include/pub_tool_errormgr.h
trunk/memcheck/mc_errors.c
trunk/memcheck/tests/error_counts.stdout.exp
Modified: trunk/coregrind/m_errormgr.c
===================================================================
--- trunk/coregrind/m_errormgr.c 2009-08-10 07:47:43 UTC (rev 10766)
+++ trunk/coregrind/m_errormgr.c 2009-08-10 07:50:00 UTC (rev 10767)
@@ -737,11 +737,10 @@
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 @@
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
Modified: trunk/include/pub_tool_errormgr.h
===================================================================
--- trunk/include/pub_tool_errormgr.h 2009-08-10 07:47:43 UTC (rev 10766)
+++ trunk/include/pub_tool_errormgr.h 2009-08-10 07:50:00 UTC (rev 10767)
@@ -85,7 +85,7 @@
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
Modified: trunk/memcheck/mc_errors.c
===================================================================
--- trunk/memcheck/mc_errors.c 2009-08-10 07:47:43 UTC (rev 10766)
+++ trunk/memcheck/mc_errors.c 2009-08-10 07:50:00 UTC (rev 10767)
@@ -951,7 +951,7 @@
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,
Modified: trunk/memcheck/tests/error_counts.stdout.exp
===================================================================
--- trunk/memcheck/tests/error_counts.stdout.exp 2009-08-10 07:47:43 UTC (rev 10766)
+++ trunk/memcheck/tests/error_counts.stdout.exp 2009-08-10 07:50:00 UTC (rev 10767)
@@ -12,4 +12,4 @@
reachable: 99 bytes in 1 blocks
suppressed: 0 bytes in 0 blocks
-errors: 1
+errors: 10
|