|
From: <sv...@va...> - 2011-08-24 15:07:10
|
Author: bart
Date: 2011-08-24 16:02:21 +0100 (Wed, 24 Aug 2011)
New Revision: 12003
Log:
drd: Avoid reporting false positive race reports inside pthread_join().
Note: I haven't analyzed yet since which commit these false positives
started to appear but it's most likely a commit applied after the 3.6
release.
Modified:
trunk/drd/drd_pthread_intercepts.c
Modified: trunk/drd/drd_pthread_intercepts.c
===================================================================
--- trunk/drd/drd_pthread_intercepts.c 2011-08-23 20:29:10 UTC (rev 12002)
+++ trunk/drd/drd_pthread_intercepts.c 2011-08-24 15:02:21 UTC (rev 12003)
@@ -483,12 +483,18 @@
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
+ /*
+ * Avoid that the sys_futex(td->tid) call invoked by the NPTL pthread_join()
+ * implementation triggers a (false positive) race report.
+ */
+ ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN();
CALL_FN_W_WW(ret, fn, pt_joinee, thread_return);
if (ret == 0)
{
VALGRIND_DO_CLIENT_REQUEST_EXPR(-1, VG_USERREQ__POST_THREAD_JOIN,
pt_joinee, 0, 0, 0, 0);
}
+ ANNOTATE_IGNORE_READS_AND_WRITES_END();
return ret;
}
|