diff options
author | timurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-02 21:16:24 +0000 |
---|---|---|
committer | timurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-02 21:16:24 +0000 |
commit | 3b36fa69cfa50c58ce0e5e4f969da2f8c95496d7 (patch) | |
tree | fb9c4764c36274b9d93fad47da0cd34b522ef877 /base/thread_unittest.cc | |
parent | ef300036626086e2ea520cd36d7926a91591918f (diff) | |
download | chromium_src-3b36fa69cfa50c58ce0e5e4f969da2f8c95496d7.zip chromium_src-3b36fa69cfa50c58ce0e5e4f969da2f8c95496d7.tar.gz chromium_src-3b36fa69cfa50c58ce0e5e4f969da2f8c95496d7.tar.bz2 |
Annotate a test-only data race on boolean
We had a suppression for this race, but it couldn't hide the race in some rare cases like
http://build.chromium.org/buildbot/waterfall/builders/Linux Tests (tsan)/builds/1213/steps/valgrind test%3A base/logs/stdio
when the order of the racing accesses was different.
Review URL: http://codereview.chromium.org/466009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33603 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/thread_unittest.cc')
-rw-r--r-- | base/thread_unittest.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/base/thread_unittest.cc b/base/thread_unittest.cc index a7407e2..90aec51 100644 --- a/base/thread_unittest.cc +++ b/base/thread_unittest.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/dynamic_annotations.h" #include "base/lock.h" #include "base/message_loop.h" #include "base/string_util.h" @@ -18,6 +19,8 @@ namespace { class ToggleValue : public Task { public: explicit ToggleValue(bool* value) : value_(value) { + ANNOTATE_BENIGN_RACE(value, "Test-only data race on boolean " + "in base/thread_unittest"); } virtual void Run() { *value_ = !*value_; |