|
From: <sv...@va...> - 2008-03-13 17:46:56
|
Author: bart
Date: 2008-03-13 17:47:01 +0000 (Thu, 13 Mar 2008)
New Revision: 7670
Log:
Disabled the warning on sending a signal without having locked the associated mutex, since this is not always an error.
Modified:
trunk/exp-drd/drd_cond.c
trunk/exp-drd/tests/pth_cond_race.stderr.exp
trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp
Modified: trunk/exp-drd/drd_cond.c
===================================================================
--- trunk/exp-drd/drd_cond.c 2008-03-13 17:34:43 UTC (rev 7669)
+++ trunk/exp-drd/drd_cond.c 2008-03-13 17:47:01 UTC (rev 7670)
@@ -245,6 +245,9 @@
{
if (! mutex_is_locked_by(cond_p->mutex, drd_tid))
{
+ /* A signal is sent while the associated mutex has not been locked. */
+ /* This can indicate but is not necessarily a race condition. */
+#if 0
CondRaceErrInfo cei;
cei.cond = cond;
cei.mutex = cond_p->mutex;
@@ -253,6 +256,7 @@
VG_(get_IP)(vg_tid),
"CondErr",
&cei);
+#endif
}
}
else
Modified: trunk/exp-drd/tests/pth_cond_race.stderr.exp
===================================================================
--- trunk/exp-drd/tests/pth_cond_race.stderr.exp 2008-03-13 17:34:43 UTC (rev 7669)
+++ trunk/exp-drd/tests/pth_cond_race.stderr.exp 2008-03-13 17:47:01 UTC (rev 7670)
@@ -1,10 +1,3 @@
-Thread 2:
-Race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
- at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
- by 0x........: thread_func (pth_cond_race.c:?)
- by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
- by 0x........: (within libpthread-?.?.so)
- by 0x........: clone (in /...libc...)
-ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Modified: trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp
===================================================================
--- trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp 2008-03-13 17:34:43 UTC (rev 7669)
+++ trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp 2008-03-13 17:47:01 UTC (rev 7670)
@@ -3,52 +3,17 @@
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:69)
-Thread 3:
-Race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
- at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
- by 0x........: rescue_me (tc23_bogus_condwait.c:20)
- by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
- by 0x........: (within libpthread-?.?.so)
- by 0x........: clone (in /...libc...)
-
-Thread 1:
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)
-Thread 3:
-Race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
- at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
- by 0x........: rescue_me (tc23_bogus_condwait.c:24)
- by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
- by 0x........: (within libpthread-?.?.so)
- by 0x........: clone (in /...libc...)
-
-Thread 1:
Not a mutex
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:75)
-Thread 3:
-Race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
- at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
- by 0x........: rescue_me (tc23_bogus_condwait.c:28)
- by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
- by 0x........: (within libpthread-?.?.so)
- by 0x........: clone (in /...libc...)
-
-Thread 1:
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)
-
-Thread 3:
-Race condition: condition variable 0x........ has been signalled but the associated mutex 0x........ is not locked by the signalling thread
- at 0x........: pthread_cond_signal* (drd_pthread_intercepts.c:?)
- by 0x........: rescue_me (tc23_bogus_condwait.c:32)
- by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
- by 0x........: (within libpthread-?.?.so)
- by 0x........: clone (in /...libc...)
The impossible happened: mutex 0x........ is locked simultaneously by two threads (recursion count 1, owners 2 and 1) !
Thread 2:
@@ -59,4 +24,4 @@
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
-ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
|