}
tl_assert(p->mutex);
q = mutex_get(p->mutex);
- if (q && q->recursion_count > 0)
+ if (q && q->owner == thread_get_running_tid() && q->recursion_count > 0)
{
const ThreadId vg_tid = VG_(get_running_tid)();
MutexErrInfo MEI = { q->a1, q->recursion_count, q->owner };
at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
by 0x........: main (tc23_bogus_condwait.c:78)
-Mutex locked recursively: 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:
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:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
-ERROR SUMMARY: 12 errors from 12 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0)