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

Issue 23441047: Fix race condition in DataFetcherSharedMemoryBase (Closed)

Created:
7 years, 3 months ago by timvolodine
Modified:
7 years, 3 months ago
CC:
chromium-reviews, jam, joi+watch-content_chromium.org, darin-cc_chromium.org, timurrrr+watch_chromium.org, glider+watch_chromium.org, bruening+watch_chromium.org, Timur Iskhodzhanov
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=221404

Patch Set 1 #

Messages

Total messages: 9 (0 generated)
timvolodine
7 years, 3 months ago (2013-09-04 16:35:40 UTC) #1
timvolodine
+ bruening@ for tools/valgrind/tsan/suppressions.txt
7 years, 3 months ago (2013-09-04 16:36:17 UTC) #2
timvolodine
7 years, 3 months ago (2013-09-04 16:36:52 UTC) #3
bulach
wow, great catch! lgtm, thanks!
7 years, 3 months ago (2013-09-04 16:51:45 UTC) #4
timvolodine
+ timurrrr@ (as Derek seems to be OOO)
7 years, 3 months ago (2013-09-05 10:36:52 UTC) #5
Alexander Potapenko
On 2013/09/05 10:36:52, timvolodine wrote: > + timurrrr@ > (as Derek seems to be OOO) ...
7 years, 3 months ago (2013-09-05 10:40:54 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/timvolodine@chromium.org/23441047/1
7 years, 3 months ago (2013-09-05 10:43:39 UTC) #7
Timur Iskhodzhanov
2013/9/5 <timvolodine@chromium.org> > + timurrrr@ > (as Derek seems to be OOO) > FYI you ...
7 years, 3 months ago (2013-09-05 11:05:19 UTC) #8
commit-bot: I haz the power
7 years, 3 months ago (2013-09-05 13:25:04 UTC) #9
Message was sent while issue was closed.
Change committed as 221404

Powered by Google App Engine
This is Rietveld 408576698