From 3b36fa69cfa50c58ce0e5e4f969da2f8c95496d7 Mon Sep 17 00:00:00 2001 From: "timurrrr@chromium.org" Date: Wed, 2 Dec 2009 21:16:24 +0000 Subject: 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 --- base/thread_unittest.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'base') 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_; -- cgit v1.1