summaryrefslogtreecommitdiffstats
path: root/tools/valgrind
diff options
context:
space:
mode:
authortimvolodine@chromium.org <timvolodine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-05 13:25:01 +0000
committertimvolodine@chromium.org <timvolodine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-05 13:25:01 +0000
commit18ef6bf7fac7c4681ebd84719dc9287c6b321e4c (patch)
tree2f9370f5808fd80c32f6b344940b5f76b08d9cb4 /tools/valgrind
parenta977af431ca713fd9c6ef259df09312e496426d0 (diff)
downloadchromium_src-18ef6bf7fac7c4681ebd84719dc9287c6b321e4c.zip
chromium_src-18ef6bf7fac7c4681ebd84719dc9287c6b321e4c.tar.gz
chromium_src-18ef6bf7fac7c4681ebd84719dc9287c6b321e4c.tar.bz2
Fix race condition in DataFetcherSharedMemoryBase
A race condition can occur when a polling thread tries to obtain a pointer to the shared memory via a std::map, while that map is modified by the main thread. This patch implements a fix such that the polling thread does not have direct access to the std::map where the shared memory pointers are stored. Instead the pointer is passed as an argument of the Start() method. This patch fixes the DataFetcherSharedMemoryBaseTest.DoesPollMotionAndOrientation test on linux tsan. BUG=284959 Review URL: https://chromiumcodereview.appspot.com/23441047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221404 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/valgrind')
-rw-r--r--tools/valgrind/tsan/suppressions.txt14
1 files changed, 0 insertions, 14 deletions
diff --git a/tools/valgrind/tsan/suppressions.txt b/tools/valgrind/tsan/suppressions.txt
index b969b84..5251a61 100644
--- a/tools/valgrind/tsan/suppressions.txt
+++ b/tools/valgrind/tsan/suppressions.txt
@@ -1129,17 +1129,3 @@
fun:content::UtilityThreadImpl::UtilityThreadImpl
fun:content::UtilityMainThread::InitInternal
}
-{
- bug_284959
- ThreadSanitizer:Race
- fun:std::_Rb_tree_insert_and_rebalance
- fun:std::_Rb_tree::_M_insert_
- fun:std::_Rb_tree::_M_insert_unique_
- fun:std::map::insert
- fun:std::map::operator[]
- fun:content::DataFetcherSharedMemoryBase::GetSharedMemory
- fun:content::DataFetcherSharedMemoryBase::GetSharedMemoryBuffer
- fun:content::DataFetcherSharedMemoryBase::StartFetchingDeviceData
- fun:content::::DataFetcherSharedMemoryBaseTest_DoesPollMotionAndOrientation_Test::TestBody
- fun:testing::internal::HandleSehExceptionsInMethodIfSupported
-}