|
From: <sv...@va...> - 2017-04-25 13:52:28
|
Author: petarj
Date: Tue Apr 25 14:52:21 2017
New Revision: 16312
Log:
make helgrind/tc23_bogus_condwait test deterministic
Using properly initialized mutex (instead of a dirty one) in case
"mx is not locked" makes behavior of this test deterministic.
Patch by Tamara Vlahovic.
Modified:
trunk/helgrind/tests/tc23_bogus_condwait.c
Modified: trunk/helgrind/tests/tc23_bogus_condwait.c
==============================================================================
--- trunk/helgrind/tests/tc23_bogus_condwait.c (original)
+++ trunk/helgrind/tests/tc23_bogus_condwait.c Tue Apr 25 14:52:21 2017
@@ -69,7 +69,7 @@
r= pthread_cond_wait(&cv, (pthread_mutex_t*)(4 + (char*)&mx[0]) );
/* mx is not locked */
- r= pthread_cond_wait(&cv, &mx[0]);
+ r= pthread_cond_wait(&cv, &mx[3]);
/* wrong flavour of lock */
r= pthread_cond_wait(&cv, (pthread_mutex_t*)&rwl );
|