]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Made the error reporting behavior of DRD similar to that of other
authorBart Van Assche <bvanassche@acm.org>
Mon, 27 Jul 2009 14:04:46 +0000 (14:04 +0000)
committerBart Van Assche <bvanassche@acm.org>
Mon, 27 Jul 2009 14:04:46 +0000 (14:04 +0000)
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.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10633

drd/drd_error.c
drd/tests/bar_bad.stderr.exp
drd/tests/omp_matinv_racy.stderr.exp
drd/tests/pth_barrier2.stderr.exp
drd/tests/pth_barrier3.stderr.exp
drd/tests/tc09_bad_unlock.stderr.exp
drd/tests/tc09_bad_unlock.stderr.exp-glibc2.8
drd/tests/tc23_bogus_condwait.stderr.exp-darwin
drd/tests/tc23_bogus_condwait.stderr.exp-linux-ppc
drd/tests/tc23_bogus_condwait.stderr.exp-linux-x86
drd/tests/thread_name.stderr.exp

index b15eafc39da8376f935d22bc14209aec63886f34..ea6220ae3d0a94f78eb7ce8a30119736c5f3b391 100644 (file)
@@ -190,7 +190,7 @@ void drd_report_data_race(Error* const err, const DataRaceErrInfo* const dri)
 
 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)
index 6b50433a512bf156c6f8eaf34856c32514ed450b..ea51161dd491da5c4b1b013a7bc9f15e9be937a5 100644 (file)
@@ -31,13 +31,6 @@ barrier 0x........ was first observed at:
    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
index a3c5c4f6ebe70f2e7c28913c2127e4b747d772b8..8340d6c3009b34e47503450e98641e644a7d08c7 100644 (file)
@@ -1 +1 @@
-ERROR SUMMARY: 76 errors from 76 contexts
+ERROR SUMMARY: 76 errors from 7 contexts
index b1a6f0be1baa1cb356e95c8cdd5f6aa9f8ffa075..bb25d5288aaf86f45816aea15f932659a9893eb2 100644 (file)
@@ -1 +1 @@
-ERROR SUMMARY: 32 errors from 32 contexts
+ERROR SUMMARY: 32 errors from 1 contexts
index 7e1382d34037c5fb987aa601d8b8b79c2c42df88..6c5b8a3576b92306399ccf2d63a1db83ed3bb6ba 100644 (file)
@@ -1 +1 @@
-ERROR SUMMARY: 31 errors from 31 contexts
+ERROR SUMMARY: 31 errors from 1 contexts
index 870958f64c81dfbacb957d89cbdf5b1df0c001ec..825090a5acdff4657b4abc4b6612c31977b3ae9d 100644 (file)
@@ -42,17 +42,6 @@ mutex 0x........ was first observed at:
    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 @@ mutex 0x........ was first observed at:
    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)
index 8aeeb0cce3970cd5037cb7fac0d94ef1a301cd95..ae6f8805329478c26c0d038b96f229ac5b1666d5 100644 (file)
@@ -42,17 +42,6 @@ mutex 0x........ was first observed at:
    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 @@ mutex 0x........ was first observed at:
    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)
index 6cbd844d089f525c4ae142111eefdf8b727ca313..81ce9e75ab54b6426fabc919c3a078aa01d5c98e 100644 (file)
@@ -1,8 +1,4 @@
 
-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)
-
 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)
@@ -34,13 +30,6 @@ rwlock 0x........ was first observed at:
    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 @@ mutex 0x........ was first observed at:
    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)
index 135ea9afee96dc325f79dfdc694129355f874fff..19842f6e511590c7a2cf7ec3ffa51809d8a5facc 100644 (file)
@@ -1,8 +1,4 @@
 
-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)
-
 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)
@@ -13,4 +9,4 @@ Process terminating with default action of signal 7 (SIGBUS)
    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)
index eb619bd2d0d96a18482bec94ca281ea669f3d362..46c92e168e1fed977b417a11c3b27a6f4586cf61 100644 (file)
@@ -1,8 +1,4 @@
 
-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)
-
 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)
@@ -44,13 +40,6 @@ rwlock 0x........ was first observed at:
    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 @@ mutex 0x........ was first observed at:
    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)
index b74a4ada90012f2e85cbde97f83a079f3d647cfd..75112198b56c2c458c7519d3a0828534055602d1 100644 (file)
@@ -11,82 +11,28 @@ The object at address 0x........ is not a mutex.
 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)