]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Disabled the warning on sending a signal without having locked the associated mutex...
authorBart Van Assche <bvanassche@acm.org>
Thu, 13 Mar 2008 17:47:01 +0000 (17:47 +0000)
committerBart Van Assche <bvanassche@acm.org>
Thu, 13 Mar 2008 17:47:01 +0000 (17:47 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7670

exp-drd/drd_cond.c
exp-drd/tests/pth_cond_race.stderr.exp
exp-drd/tests/tc23_bogus_condwait.stderr.exp

index 62e8089fe30e0e6c3b35f0f27ded9dc1d0dbe95c..9d85676a7d8083672aa386a28b30849622a374d9 100644 (file)
@@ -245,6 +245,9 @@ static void cond_signal(Addr const cond)
   {
     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 @@ static void cond_signal(Addr const cond)
                               VG_(get_IP)(vg_tid),
                               "CondErr",
                               &cei);
+#endif
     }
   }
   else
index cfaf6397c1fc486ea0237c04db181028a97c536f..d18786f80668a209115b4a13cf5e8afa8d9cd471 100644 (file)
@@ -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)
index f82ce01c13ad26a794038290c264d38702eed78c..e0caaa71098393d94d0f2473d6fed7791646df13 100644 (file)
@@ -3,52 +3,17 @@ Not a mutex
    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 @@ Mutex not locked by calling thread: mutex 0x........, recursion count 2, owner 1
    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)