|
From: Florian K. <br...@ac...> - 2011-09-15 04:17:13
|
This testcase causes a SIGILL on s390x. The reason for that is that
the 2nd argument of this pthread_cond_wait
/* mx is bogus */
r= pthread_cond_wait(&cv, (pthread_mutex_t*)(1 + (char*)&mx[0]) );
appears as the memory operand in a compare and swap instruction. And
that insn requires its memory operand to be word aligned. This one isn't.
So on s390x that testcase doesn't run through.
I'd like to change it like so:
Index: tc23_bogus_condwait.c
===================================================================
--- tc23_bogus_condwait.c (revision 12034)
+++ tc23_bogus_condwait.c (working copy)
@@ -66,7 +66,7 @@
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]);
Would that be OK or is it important for the testcase that the address is
odd?
Florian
|