An error message is now printed if two different threads call
pthread_cond_*wait() on the same condition variable but with a different
mutex argument. Added regression test pth_inconsistent_cond_wait.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8298 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/exp-drd/drd_error.h b/exp-drd/drd_error.h
index fbff475..6b56051 100644
--- a/exp-drd/drd_error.h
+++ b/exp-drd/drd_error.h
@@ -43,20 +43,22 @@
MutexErr = 2,
#define STR_CondErr "CondErr"
CondErr = 3,
-#define STR_CondRaceErr "CondRaceErr"
- CondRaceErr = 4,
#define STR_CondDestrErr "CondDestrErr"
- CondDestrErr = 5,
+ CondDestrErr = 4,
+#define STR_CondRaceErr "CondRaceErr"
+ CondRaceErr = 5,
+#define STR_CondWaitErr "CondWaitErr"
+ CondWaitErr = 6,
#define STR_SemaphoreErr "SemaphoreErr"
- SemaphoreErr = 6,
+ SemaphoreErr = 7,
#define STR_BarrierErr "BarrierErr"
- BarrierErr = 7,
+ BarrierErr = 8,
#define STR_RwlockErr "RwlockErr"
- RwlockErr = 8,
+ RwlockErr = 9,
#define STR_HoldtimeErr "HoldtimeErr"
- HoldtimeErr = 9,
+ HoldtimeErr = 10,
#define STR_GenericErr "GenericErr"
- GenericErr = 10,
+ GenericErr = 11,
} DrdErrorKind;
/* The classification of a faulting address. */
@@ -106,15 +108,21 @@
} CondErrInfo;
typedef struct {
+ Addr cond;
+ Addr mutex;
+ DrdThreadId tid;
+} CondDestrErrInfo;
+
+typedef struct {
Addr cond;
Addr mutex;
} CondRaceErrInfo;
typedef struct {
- Addr cond;
- Addr mutex;
- DrdThreadId tid;
-} CondDestrErrInfo;
+ Addr cond;
+ Addr mutex1;
+ Addr mutex2;
+} CondWaitErrInfo;
typedef struct {
Addr semaphore;