From: Florian Krohm Date: Sun, 18 Sep 2011 00:11:12 +0000 (+0000) Subject: Fix tc23_bogus_condwait.c testcase for s390x. X-Git-Tag: svn/VALGRIND_3_7_0~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88a761ec9ea91aa6391da4281ba411a2ef71389b;p=thirdparty%2Fvalgrind.git Fix tc23_bogus_condwait.c testcase for s390x. The testcase used to cause a SIGILL because the address of the bogus mutex 1 + (char*)&mx[0] denotes a memory location that will eventually appear in a compare-and-swap instruction. That insn does not allow memory operands that are not word-aligned. Hence, the SIGILL. With this fix both incarnations of this testcase (in helgrind and drd) pass. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12038 --- diff --git a/helgrind/tests/tc23_bogus_condwait.c b/helgrind/tests/tc23_bogus_condwait.c index 4c7e55bcc3..6e397683aa 100644 --- a/helgrind/tests/tc23_bogus_condwait.c +++ b/helgrind/tests/tc23_bogus_condwait.c @@ -66,7 +66,7 @@ int main ( void ) trouble */ /* mx is bogus */ - r= pthread_cond_wait(&cv, (pthread_mutex_t*)(1 + (char*)&mx[0]) ); + r= pthread_cond_wait(&cv, (pthread_mutex_t*)(4 + (char*)&mx[0]) ); /* mx is not locked */ r= pthread_cond_wait(&cv, &mx[0]);