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

Issue 1256903005: base/threading: fix a potential race issue on start_event_ (Closed)

Created:
5 years, 4 months ago by Takashi Toyoshima
Modified:
5 years, 4 months ago
Reviewers:
Lei Zhang
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

base/threading: fix a potential race issue on start_event_ WaitableEvent is thread-safe, but scoped_ptr<WaitableEvent> is not. It should need a mutex lock to access the internal pointer if the pointer may be set or reset after the thread creation that will share the scoped_ptr. Avoid the issue, use WaitableEvent instead of scoped_ptr<WaitableEvent>. Committed: https://crrev.com/53818d55bbb632e703158aa831a03794bffd23f2 Cr-Commit-Position: refs/heads/master@{#342082}

Patch Set 1 #

Patch Set 2 : revise #

Patch Set 3 : simpler #

Total comments: 3

Patch Set 4 : review #3/#5 #

Patch Set 5 : [rebase] #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -22 lines) Patch
M base/threading/platform_thread_posix.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M base/threading/thread.h View 2 6 chunks +9 lines, -7 lines 0 comments Download
M base/threading/thread.cc View 1 2 3 4 7 chunks +12 lines, -13 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
Takashi Toyoshima
Lei: I achieve the initial goal to remove a jank of thread creation on pthreads. ...
5 years, 4 months ago (2015-07-31 09:25:56 UTC) #2
Lei Zhang
Do you think it's possible to write a test for the existing code that causes ...
5 years, 4 months ago (2015-07-31 20:52:50 UTC) #3
Takashi Toyoshima
Hum... this is just a potential issue, and current code could not hit the case ...
5 years, 4 months ago (2015-08-05 04:48:42 UTC) #4
Lei Zhang
On 2015/08/05 04:48:42, Takashi Toyoshima (chromium) wrote: > Hum... this is just a potential issue, ...
5 years, 4 months ago (2015-08-05 20:06:10 UTC) #5
Takashi Toyoshima
Thanks. I uploaded new patch set 4 that addressed the point, and patch set 5 ...
5 years, 4 months ago (2015-08-06 05:20:52 UTC) #6
Lei Zhang
lgtm
5 years, 4 months ago (2015-08-06 06:10:42 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1256903005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1256903005/80001
5 years, 4 months ago (2015-08-06 06:18:43 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/89517)
5 years, 4 months ago (2015-08-06 07:30:24 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1256903005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1256903005/80001
5 years, 4 months ago (2015-08-06 08:03:30 UTC) #13
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 4 months ago (2015-08-06 09:03:15 UTC) #14
commit-bot: I haz the power
5 years, 4 months ago (2015-08-06 09:03:52 UTC) #15
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/53818d55bbb632e703158aa831a03794bffd23f2
Cr-Commit-Position: refs/heads/master@{#342082}

Powered by Google App Engine
This is Rietveld 408576698