|
From: <sv...@va...> - 2009-07-27 14:04:59
|
Author: bart
Date: 2009-07-27 15:04:46 +0100 (Mon, 27 Jul 2009)
New Revision: 10633
Log:
Made the error reporting behavior of DRD similar to that of other
Valgrind tools: if the same kind of error has been detected a second
time with an identical call stack, count it as an error but do not print
it a second time. The total number of detected errors remains unchanged
but the number of error contexts is now reported correctly.
Modified:
trunk/drd/drd_error.c
trunk/drd/tests/bar_bad.stderr.exp
trunk/drd/tests/omp_matinv_racy.stderr.exp
trunk/drd/tests/pth_barrier2.stderr.exp
trunk/drd/tests/pth_barrier3.stderr.exp
trunk/drd/tests/tc09_bad_unlock.stderr.exp
trunk/drd/tests/tc09_bad_unlock.stderr.exp-glibc2.8
trunk/drd/tests/tc23_bogus_condwait.stderr.exp-darwin
trunk/drd/tests/tc23_bogus_condwait.stderr.exp-linux-ppc
trunk/drd/tests/tc23_bogus_condwait.stderr.exp-linux-x86
trunk/drd/tests/thread_name.stderr.exp
Modified: trunk/drd/drd_error.c
===================================================================
--- trunk/drd/drd_error.c 2009-07-27 12:03:03 UTC (rev 10632)
+++ trunk/drd/drd_error.c 2009-07-27 14:04:46 UTC (rev 10633)
@@ -190,7 +190,7 @@
static Bool drd_tool_error_eq(VgRes res, Error* e1, Error* e2)
{
- return False;
+ return True;
}
static void drd_tool_error_before_pp(Error* const e)
Modified: trunk/drd/tests/bar_bad.stderr.exp
===================================================================
--- trunk/drd/tests/bar_bad.stderr.exp 2009-07-27 12:03:03 UTC (rev 10632)
+++ trunk/drd/tests/bar_bad.stderr.exp 2009-07-27 14:04:46 UTC (rev 10633)
@@ -31,13 +31,6 @@
at 0x........: pthread_barrier_init (drd_pthread_intercepts.c:?)
by 0x........: main (bar_bad.c:?)
-Destruction of barrier that is being waited upon: barrier 0x........
- at 0x........: pthread_barrier_destroy (drd_pthread_intercepts.c:?)
- by 0x........: main (bar_bad.c:?)
-barrier 0x........ was first observed at:
- at 0x........: pthread_barrier_init (drd_pthread_intercepts.c:?)
- by 0x........: main (bar_bad.c:?)
-
destroy a barrier that was never initialised
Not a barrier
Modified: trunk/drd/tests/omp_matinv_racy.stderr.exp
===================================================================
--- trunk/drd/tests/omp_matinv_racy.stderr.exp 2009-07-27 12:03:03 UTC (rev 10632)
+++ trunk/drd/tests/omp_matinv_racy.stderr.exp 2009-07-27 14:04:46 UTC (rev 10633)
@@ -1 +1 @@
-ERROR SUMMARY: 76 errors from 76 contexts
+ERROR SUMMARY: 76 errors from 7 contexts
Modified: trunk/drd/tests/pth_barrier2.stderr.exp
===================================================================
--- trunk/drd/tests/pth_barrier2.stderr.exp 2009-07-27 12:03:03 UTC (rev 10632)
+++ trunk/drd/tests/pth_barrier2.stderr.exp 2009-07-27 14:04:46 UTC (rev 10633)
@@ -1 +1 @@
-ERROR SUMMARY: 32 errors from 32 contexts
+ERROR SUMMARY: 32 errors from 1 contexts
Modified: trunk/drd/tests/pth_barrier3.stderr.exp
===================================================================
--- trunk/drd/tests/pth_barrier3.stderr.exp 2009-07-27 12:03:03 UTC (rev 10632)
+++ trunk/drd/tests/pth_barrier3.stderr.exp 2009-07-27 14:04:46 UTC (rev 10633)
@@ -1 +1 @@
-ERROR SUMMARY: 31 errors from 31 contexts
+ERROR SUMMARY: 31 errors from 1 contexts
Modified: trunk/drd/tests/tc09_bad_unlock.stderr.exp
===================================================================
--- trunk/drd/tests/tc09_bad_unlock.stderr.exp 2009-07-27 12:03:03 UTC (rev 10632)
+++ trunk/drd/tests/tc09_bad_unlock.stderr.exp 2009-07-27 14:04:46 UTC (rev 10633)
@@ -42,17 +42,6 @@
by 0x........: nearly_main (tc09_bad_unlock.c:23)
by 0x........: main (tc09_bad_unlock.c:50)
-Thread 2:
-Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 1.
- at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
- by 0x........: child_fn (tc09_bad_unlock.c:11)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-Thread 1:
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:41)
@@ -66,4 +55,4 @@
by 0x........: nearly_main (tc09_bad_unlock.c:31)
by 0x........: main (tc09_bad_unlock.c:50)
-ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 7 contexts (suppressed: 0 from 0)
Modified: trunk/drd/tests/tc09_bad_unlock.stderr.exp-glibc2.8
===================================================================
--- trunk/drd/tests/tc09_bad_unlock.stderr.exp-glibc2.8 2009-07-27 12:03:03 UTC (rev 10632)
+++ trunk/drd/tests/tc09_bad_unlock.stderr.exp-glibc2.8 2009-07-27 14:04:46 UTC (rev 10633)
@@ -42,17 +42,6 @@
by 0x........: nearly_main (tc09_bad_unlock.c:23)
by 0x........: main (tc09_bad_unlock.c:50)
-Thread 2:
-Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 1.
- at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
- by 0x........: child_fn (tc09_bad_unlock.c:11)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-Thread 1:
The object at address 0x........ is not a mutex.
at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:41)
@@ -66,4 +55,4 @@
by 0x........: nearly_main (tc09_bad_unlock.c:31)
by 0x........: main (tc09_bad_unlock.c:50)
-ERROR SUMMARY: 8 errors from 8 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 7 contexts (suppressed: 0 from 0)
Modified: trunk/drd/tests/tc23_bogus_condwait.stderr.exp-darwin
===================================================================
--- trunk/drd/tests/tc23_bogus_condwait.stderr.exp-darwin 2009-07-27 12:03:03 UTC (rev 10632)
+++ trunk/drd/tests/tc23_bogus_condwait.stderr.exp-darwin 2009-07-27 14:04:46 UTC (rev 10633)
@@ -3,10 +3,6 @@
at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:69)
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:69)
-
Mutex not locked: mutex 0x........, recursion count 0, owner 0.
at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:72)
@@ -34,13 +30,6 @@
at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:57)
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:75)
-rwlock 0x........ was first observed at:
- at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:57)
-
Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 2.
at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:78)
@@ -70,4 +59,4 @@
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:53)
-ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 9 errors from 7 contexts (suppressed: 0 from 0)
Modified: trunk/drd/tests/tc23_bogus_condwait.stderr.exp-linux-ppc
===================================================================
--- trunk/drd/tests/tc23_bogus_condwait.stderr.exp-linux-ppc 2009-07-27 12:03:03 UTC (rev 10632)
+++ trunk/drd/tests/tc23_bogus_condwait.stderr.exp-linux-ppc 2009-07-27 14:04:46 UTC (rev 10633)
@@ -3,14 +3,10 @@
at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:69)
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:69)
-
Process terminating with default action of signal 7 (SIGBUS)
Invalid address alignment at address 0x........
at 0x........: (within libpthread-?.?.so)
by 0x........: pthread_cond_wait@@GLIBC_2.3.2(within libpthread-?.?.so)
by 0x........: main (tc23_bogus_condwait.c:69)
-ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 0 from 0)
Modified: trunk/drd/tests/tc23_bogus_condwait.stderr.exp-linux-x86
===================================================================
--- trunk/drd/tests/tc23_bogus_condwait.stderr.exp-linux-x86 2009-07-27 12:03:03 UTC (rev 10632)
+++ trunk/drd/tests/tc23_bogus_condwait.stderr.exp-linux-x86 2009-07-27 14:04:46 UTC (rev 10633)
@@ -3,10 +3,6 @@
at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:69)
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:69)
-
Thread 3:
Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?)
@@ -44,13 +40,6 @@
at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:57)
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:75)
-rwlock 0x........ was first observed at:
- at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
- by 0x........: main (tc23_bogus_condwait.c:57)
-
Thread 3:
Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread.
at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?)
@@ -93,4 +82,4 @@
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:53)
-ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 11 errors from 9 contexts (suppressed: 0 from 0)
Modified: trunk/drd/tests/thread_name.stderr.exp
===================================================================
--- trunk/drd/tests/thread_name.stderr.exp 2009-07-27 12:03:03 UTC (rev 10632)
+++ trunk/drd/tests/thread_name.stderr.exp 2009-07-27 14:04:46 UTC (rev 10633)
@@ -11,82 +11,28 @@
thread_func instance 2
-Thread 3 (thread_func instance 2):
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
- by 0x........: thread_func (thread_name.c:?)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-
thread_func instance 3
-Thread 4 (thread_func instance 3):
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
- by 0x........: thread_func (thread_name.c:?)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-
thread_func instance 4
-Thread 5 (thread_func instance 4):
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
- by 0x........: thread_func (thread_name.c:?)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-
thread_func instance 5
-Thread 6 (thread_func instance 5):
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
- by 0x........: thread_func (thread_name.c:?)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-
thread_func instance 6
-Thread 7 (thread_func instance 6):
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
- by 0x........: thread_func (thread_name.c:?)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-
thread_func instance 7
-Thread 8 (thread_func instance 7):
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
- by 0x........: thread_func (thread_name.c:?)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-
thread_func instance 8
-Thread 9 (thread_func instance 8):
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
- by 0x........: thread_func (thread_name.c:?)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-
thread_func instance 9
-Thread 10 (thread_func instance 9):
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
- by 0x........: thread_func (thread_name.c:?)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-
thread_func instance 10
-Thread 11 (thread_func instance 10):
-The object at address 0x........ is not a mutex.
- at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?)
- by 0x........: thread_func (thread_name.c:?)
- by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?)
-
-ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 10 errors from 1 contexts (suppressed: 0 from 0)
|