|
From: <sv...@va...> - 2007-09-12 22:09:32
|
Author: sewardj
Date: 2007-09-12 23:09:33 +0100 (Wed, 12 Sep 2007)
New Revision: 6828
Log:
ppc64-linux (glibc 2.4) fixes
Modified:
branches/THRCHECK/coregrind/m_syswrap/syswrap-ppc64-linux.c
branches/THRCHECK/glibc-2.4.supp
branches/THRCHECK/thrcheck/tests/tc07_hbl1.c
branches/THRCHECK/thrcheck/tests/tc08_hbl2.c
Modified: branches/THRCHECK/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- branches/THRCHECK/coregrind/m_syswrap/syswrap-ppc64-linux.c 2007-09-12 14:40:01 UTC (rev 6827)
+++ branches/THRCHECK/coregrind/m_syswrap/syswrap-ppc64-linux.c 2007-09-12 22:09:33 UTC (rev 6828)
@@ -341,6 +341,12 @@
ctst->client_stack_szB = 0;
}
+ /* Assume the clone will succeed, and tell any tool that wants to
+ know that this thread has come into existence. If the clone
+ fails, we'll send out a ll_exit notification for it at the out:
+ label below, to clean up. */
+ VG_TRACK ( pre_thread_ll_create, ptid, ctid );
+
if (flags & VKI_CLONE_SETTLS) {
if (debug)
VG_(printf)("clone child has SETTLS: tls at %p\n", child_tls);
@@ -374,6 +380,8 @@
/* clone failed */
VG_(cleanup_thread)(&ctst->arch);
ctst->status = VgTs_Empty;
+ /* oops. Better tell the tool the thread exited in a hurry :-) */
+ VG_TRACK( pre_thread_ll_exit, ctid );
}
return res;
Modified: branches/THRCHECK/glibc-2.4.supp
===================================================================
--- branches/THRCHECK/glibc-2.4.supp 2007-09-12 14:40:01 UTC (rev 6827)
+++ branches/THRCHECK/glibc-2.4.supp 2007-09-12 22:09:33 UTC (rev 6828)
@@ -296,3 +296,9 @@
fun:pthread_create*
fun:pthread_create*
}
+{
+ thrcheck-glibc24-ppc64-1
+ Thrcheck:Race
+ fun:__free_tcb
+ fun:pthread_join
+}
Modified: branches/THRCHECK/thrcheck/tests/tc07_hbl1.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc07_hbl1.c 2007-09-12 14:40:01 UTC (rev 6827)
+++ branches/THRCHECK/thrcheck/tests/tc07_hbl1.c 2007-09-12 22:09:33 UTC (rev 6828)
@@ -32,7 +32,7 @@
# define INC(_lval) \
__asm__ __volatile__ ( \
"lock ; incl (%0)" : /*out*/ : /*in*/"r"(&(_lval)) : "memory", "cc" )
-#elif defined(PLAT_ppc32_linux)
+#elif defined(PLAT_ppc32_linux) || defined(PLAT_ppc64_linux)
# define INC(_lval) \
__asm__ __volatile__( \
"1:\n" \
Modified: branches/THRCHECK/thrcheck/tests/tc08_hbl2.c
===================================================================
--- branches/THRCHECK/thrcheck/tests/tc08_hbl2.c 2007-09-12 14:40:01 UTC (rev 6827)
+++ branches/THRCHECK/thrcheck/tests/tc08_hbl2.c 2007-09-12 22:09:33 UTC (rev 6828)
@@ -36,7 +36,7 @@
# define INC(_lval) \
__asm__ __volatile__ ( \
"lock ; incl (%0)" : /*out*/ : /*in*/"r"(&(_lval)) : "memory", "cc" )
-#elif defined(PLAT_ppc32_linux)
+#elif defined(PLAT_ppc32_linux) || defined(PLAT_ppc64_linux)
# define INC(_lval) \
__asm__ __volatile__( \
"1:\n" \
|