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

Issue 1772343007: Two HandleVerifier thread safety fixes. (Closed)

Created:
4 years, 9 months ago by Will Harris
Modified:
4 years, 9 months ago
Reviewers:
scottmg
CC:
chromium-reviews, grt+watch_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Two HandleVerifier thread safety fixes. Two changes in this CL: 1. Before setting the g_active_verifier, check that another thread hasn't already set this. This is to cater for the situation where multiple threads attempt to create the handle verifier in the same module at the same time. The g_lock was not protecting the check to see if the handle verifier had already been instantiated by another thread before setting it. This could result in a handle verifier leaking and some handles being tracked in the leaked verifier. 2. Always instantiate the handle verifier inside the main module, unless the main module does not link with base. This means that there should be always one instance that lives in the main module. BUG=592753 TEST=base_unittests Committed: https://crrev.com/678736a103c3e64acdce5e76910ff077b17cc6c3 Cr-Commit-Position: refs/heads/master@{#380581}

Patch Set 1 #

Total comments: 2

Patch Set 2 : no functionality changes #

Total comments: 4

Patch Set 3 : nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -15 lines) Patch
M base/win/scoped_handle.cc View 1 2 4 chunks +39 lines, -15 lines 0 comments Download

Messages

Total messages: 34 (15 generated)
scottmg
I think I'm convinced, lgtm. https://codereview.chromium.org/1772343007/diff/1/base/win/scoped_handle.cc File base/win/scoped_handle.cc (right): https://codereview.chromium.org/1772343007/diff/1/base/win/scoped_handle.cc#newcode158 base/win/scoped_handle.cc:158: if (g_active_verifier) Maybe an ...
4 years, 9 months ago (2016-03-10 20:31:27 UTC) #3
Will Harris
ps2 should have no functionality changes, just moved the code around. ptal since it's more ...
4 years, 9 months ago (2016-03-10 21:08:45 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772343007/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772343007/20001
4 years, 9 months ago (2016-03-10 21:49:23 UTC) #7
scottmg
lgtm https://codereview.chromium.org/1772343007/diff/20001/base/win/scoped_handle.cc File base/win/scoped_handle.cc (right): https://codereview.chromium.org/1772343007/diff/20001/base/win/scoped_handle.cc#newcode118 base/win/scoped_handle.cc:118: bool enabled = true) { Is this allowed ...
4 years, 9 months ago (2016-03-10 22:11:22 UTC) #8
Will Harris
https://codereview.chromium.org/1772343007/diff/20001/base/win/scoped_handle.cc File base/win/scoped_handle.cc (right): https://codereview.chromium.org/1772343007/diff/20001/base/win/scoped_handle.cc#newcode118 base/win/scoped_handle.cc:118: bool enabled = true) { On 2016/03/10 22:11:22, scottmg ...
4 years, 9 months ago (2016-03-10 22:14:23 UTC) #9
scottmg
https://codereview.chromium.org/1772343007/diff/20001/base/win/scoped_handle.cc File base/win/scoped_handle.cc (right): https://codereview.chromium.org/1772343007/diff/20001/base/win/scoped_handle.cc#newcode118 base/win/scoped_handle.cc:118: bool enabled = true) { On 2016/03/10 22:14:23, Will ...
4 years, 9 months ago (2016-03-10 22:17:16 UTC) #10
Will Harris
https://codereview.chromium.org/1772343007/diff/20001/base/win/scoped_handle.cc File base/win/scoped_handle.cc (right): https://codereview.chromium.org/1772343007/diff/20001/base/win/scoped_handle.cc#newcode118 base/win/scoped_handle.cc:118: bool enabled = true) { On 2016/03/10 22:17:16, scottmg ...
4 years, 9 months ago (2016-03-10 22:18:57 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772343007/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772343007/40001
4 years, 9 months ago (2016-03-10 22:25:21 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/129020)
4 years, 9 months ago (2016-03-10 23:08:52 UTC) #17
Will Harris
On 2016/03/10 23:08:52, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 9 months ago (2016-03-10 23:38:55 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772343007/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772343007/40001
4 years, 9 months ago (2016-03-10 23:39:06 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/179785)
4 years, 9 months ago (2016-03-11 00:17:07 UTC) #22
Will Harris
On 2016/03/11 00:17:07, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 9 months ago (2016-03-11 00:32:17 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772343007/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772343007/40001
4 years, 9 months ago (2016-03-11 00:32:58 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/138223)
4 years, 9 months ago (2016-03-11 01:08:35 UTC) #27
Will Harris
On 2016/03/11 01:08:35, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 9 months ago (2016-03-11 01:09:16 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772343007/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772343007/40001
4 years, 9 months ago (2016-03-11 08:00:29 UTC) #30
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 9 months ago (2016-03-11 08:41:13 UTC) #32
commit-bot: I haz the power
4 years, 9 months ago (2016-03-11 08:42:45 UTC) #34
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/678736a103c3e64acdce5e76910ff077b17cc6c3
Cr-Commit-Position: refs/heads/master@{#380581}

Powered by Google App Engine
This is Rietveld 408576698