diff options
author | bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2011-08-24 15:02:21 +0000 |
---|---|---|
committer | bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2011-08-24 15:02:21 +0000 |
commit | 5cbd26ec7cc2033d27e3b24b0dec71e3b958db8f (patch) | |
tree | 7e069fffc82f87dc83188cc554f05f954bdd9359 | |
parent | 028ad92a18df3d01759e014f20fc0189c3578b09 (diff) |
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.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12003 a5019735-40e9-0310-863c-91ae7b9d1cf9
-rw-r--r-- | drd/drd_pthread_intercepts.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drd/drd_pthread_intercepts.c b/drd/drd_pthread_intercepts.c index 856092fa..5b13bb30 100644 --- a/drd/drd_pthread_intercepts.c +++ b/drd/drd_pthread_intercepts.c @@ -483,12 +483,18 @@ int pthread_join_intercept(pthread_t pt_joinee, void **thread_return) 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; } |