Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: ipc/ipc_sync_channel_unittest.cc

Issue 339008: Suppress a data race on vfptr in ipc/ipc_sync_channel_unittest.cc... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/valgrind/tsan/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_sync_channel_unittest.cc
===================================================================
--- ipc/ipc_sync_channel_unittest.cc (revision 30177)
+++ ipc/ipc_sync_channel_unittest.cc (working copy)
@@ -8,6 +8,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/dynamic_annotations.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/platform_thread.h"
@@ -39,7 +40,13 @@
ipc_thread_((thread_name + "_ipc").c_str()),
listener_thread_((thread_name + "_listener").c_str()),
overrided_thread_(NULL),
- shutdown_event_(true, false) { }
+ shutdown_event_(true, false) {
+ // The data race on vfptr is real but is very hard
+ // to suppress using standard Valgrind mechanism (suppressions).
+ // We have to use ANNOTATE_BENIGN_RACE to hide the reports and
+ // make ThreadSanitizer bots green.
+ ANNOTATE_BENIGN_RACE(this, "Race on vfptr, http://crbug.com/25841");
+ }
// Will create a named channel and use this name for the threads' name.
Worker(const std::string& channel_name, Channel::Mode mode)
@@ -50,7 +57,13 @@
ipc_thread_((channel_name + "_ipc").c_str()),
listener_thread_((channel_name + "_listener").c_str()),
overrided_thread_(NULL),
- shutdown_event_(true, false) { }
+ shutdown_event_(true, false) {
+ // The data race on vfptr is real but is very hard
+ // to suppress using standard Valgrind mechanism (suppressions).
+ // We have to use ANNOTATE_BENIGN_RACE to hide the reports and
+ // make ThreadSanitizer bots green.
+ ANNOTATE_BENIGN_RACE(this, "Race on vfptr, http://crbug.com/25841");
+ }
// The IPC thread needs to outlive SyncChannel, so force the correct order of
// destruction.
« no previous file with comments | « no previous file | tools/valgrind/tsan/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698