summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authortimurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 11:28:58 +0000
committertimurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 11:28:58 +0000
commit8a734428831e1ef29b0201e01457b41140bd079e (patch)
treed6f73047df698c4da07af6d1a2d3a20b7d039362 /ipc
parent718e615c688f3ffe343813042c1da15c9e624c48 (diff)
downloadchromium_src-8a734428831e1ef29b0201e01457b41140bd079e.zip
chromium_src-8a734428831e1ef29b0201e01457b41140bd079e.tar.gz
chromium_src-8a734428831e1ef29b0201e01457b41140bd079e.tar.bz2
Suppress a data race on vfptr in ipc/ipc_sync_channel_unittest.cc
This race was already suppressed, but the existing suppression doesn't work if the order of accesses is different. We can prepare a suppression to make TSAN bots silent but it will be way too wide. I think adding one line of annotation with comment (twice) is better in terms of precision. BUG=25841 Review URL: http://codereview.chromium.org/339008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30181 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_sync_channel_unittest.cc17
1 files changed, 15 insertions, 2 deletions
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc
index 3219000..007f354 100644
--- a/ipc/ipc_sync_channel_unittest.cc
+++ b/ipc/ipc_sync_channel_unittest.cc
@@ -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 @@ class Worker : public Channel::Listener, public Message::Sender {
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 @@ class Worker : public Channel::Listener, public Message::Sender {
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.