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

Issue 1779333003: Add test for multithreaded ActiveVerifier behavior. (Closed)

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

Description

Add test for multithreaded ActiveVerifier behavior. Previous to crrev.com/678736a there was a race in the setting of the g_active_verifier global that could have caused multiple instantiations. This adds a test to verify the new behavior and detect any future regressions. The test failing with the old code can be seen here: http://pastebin.com/raw/iXz8j21C BUG=592753 TEST=base_unittests --gtest_filter=ScopedHandleTest.MultiProcess Committed: https://crrev.com/8f20e83de53c12033403e198b903f81112625d0b Cr-Commit-Position: refs/heads/master@{#380835}

Patch Set 1 #

Patch Set 2 : update test #

Patch Set 3 : nits #

Total comments: 20

Patch Set 4 : code review changes #

Patch Set 5 : multiprocess #

Total comments: 12

Patch Set 6 : code review comments. fix a thread start race. #

Total comments: 12

Patch Set 7 : avoid the typedef #

Patch Set 8 : change to loadable_module #

Unified diffs Side-by-side diffs Delta from patch set Stats (+224 lines, -8 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +15 lines, -3 lines 0 comments Download
M base/base.gyp View 1 2 3 4 5 6 7 2 chunks +13 lines, -0 lines 0 comments Download
M base/base_switches.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M base/base_switches.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M base/test/test_suite.cc View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M base/win/scoped_handle.h View 1 2 3 1 chunk +6 lines, -2 lines 0 comments Download
M base/win/scoped_handle.cc View 1 2 3 4 5 4 chunks +12 lines, -0 lines 0 comments Download
A base/win/scoped_handle_test_dll.cc View 1 2 3 4 5 1 chunk +126 lines, -0 lines 0 comments Download
M base/win/scoped_handle_unittest.cc View 1 2 3 4 5 6 2 chunks +42 lines, -2 lines 0 comments Download

Messages

Total messages: 28 (10 generated)
Will Harris
PT an initial Look. Note: this test doesn't work because ICU initializes before the test ...
4 years, 9 months ago (2016-03-11 18:52:28 UTC) #3
scottmg
https://codereview.chromium.org/1779333003/diff/40001/base/win/scoped_handle.cc File base/win/scoped_handle.cc (right): https://codereview.chromium.org/1779333003/diff/40001/base/win/scoped_handle.cc#newcode296 base/win/scoped_handle.cc:296: return base::GetModuleFromAddress(pc); Can you just use &__ImageBase instead? .. ...
4 years, 9 months ago (2016-03-11 19:02:19 UTC) #4
scottmg
On 2016/03/11 18:52:28, Will Harris wrote: > PT an initial Look. > > Note: this ...
4 years, 9 months ago (2016-03-11 19:02:45 UTC) #5
Will Harris
changes made haven't yet added the multiprocess part. https://codereview.chromium.org/1779333003/diff/40001/base/win/scoped_handle.cc File base/win/scoped_handle.cc (right): https://codereview.chromium.org/1779333003/diff/40001/base/win/scoped_handle.cc#newcode296 base/win/scoped_handle.cc:296: return ...
4 years, 9 months ago (2016-03-11 20:35:32 UTC) #6
Will Harris
Added multiprocess test. PTAL.
4 years, 9 months ago (2016-03-11 21:54:57 UTC) #7
scottmg
https://codereview.chromium.org/1779333003/diff/80001/base/win/scoped_handle.cc File base/win/scoped_handle.cc (right): https://codereview.chromium.org/1779333003/diff/80001/base/win/scoped_handle.cc#newcode290 base/win/scoped_handle.cc:290: // Must pass by reference in order to avoid ...
4 years, 9 months ago (2016-03-11 22:13:10 UTC) #8
Will Harris
https://codereview.chromium.org/1779333003/diff/80001/base/win/scoped_handle.cc File base/win/scoped_handle.cc (right): https://codereview.chromium.org/1779333003/diff/80001/base/win/scoped_handle.cc#newcode290 base/win/scoped_handle.cc:290: // Must pass by reference in order to avoid ...
4 years, 9 months ago (2016-03-11 22:23:45 UTC) #9
scottmg
https://codereview.chromium.org/1779333003/diff/80001/base/win/scoped_handle_test_dll.cc File base/win/scoped_handle_test_dll.cc (right): https://codereview.chromium.org/1779333003/diff/80001/base/win/scoped_handle_test_dll.cc#newcode28 base/win/scoped_handle_test_dll.cc:28: ScopedHandle handle_holder(handle); On 2016/03/11 22:23:44, Will Harris wrote: > ...
4 years, 9 months ago (2016-03-11 22:29:00 UTC) #10
Will Harris
code review comments. also fixed a thread start race that had made the test flaky. ...
4 years, 9 months ago (2016-03-11 23:07:47 UTC) #12
Will Harris
+nico for owner
4 years, 9 months ago (2016-03-11 23:12:05 UTC) #15
scottmg
base/win/ lgtm but you need someone for the rest of base. https://codereview.chromium.org/1779333003/diff/80001/base/win/scoped_handle_test_dll.cc File base/win/scoped_handle_test_dll.cc (right): ...
4 years, 9 months ago (2016-03-11 23:14:19 UTC) #17
Nico
brace for incoming stream-of-consciousness review comments. after reading the whole cl, the comments at the ...
4 years, 9 months ago (2016-03-11 23:26:58 UTC) #18
Nico
https://codereview.chromium.org/1779333003/diff/110001/base/win/scoped_handle_test_dll.cc File base/win/scoped_handle_test_dll.cc (right): https://codereview.chromium.org/1779333003/diff/110001/base/win/scoped_handle_test_dll.cc#newcode35 base/win/scoped_handle_test_dll.cc:35: ScopedHandle handle_holder(handle); On 2016/03/11 23:26:58, Nico wrote: > this ...
4 years, 9 months ago (2016-03-11 23:34:21 UTC) #19
Will Harris
thanks for comments. PTAL. https://codereview.chromium.org/1779333003/diff/110001/base/BUILD.gn File base/BUILD.gn (right): https://codereview.chromium.org/1779333003/diff/110001/base/BUILD.gn#newcode1601 base/BUILD.gn:1601: ":base", On 2016/03/11 23:26:58, Nico ...
4 years, 9 months ago (2016-03-12 00:00:01 UTC) #20
Nico
lgtm
4 years, 9 months ago (2016-03-12 00:11:04 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1779333003/150001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1779333003/150001
4 years, 9 months ago (2016-03-12 00:21:59 UTC) #24
commit-bot: I haz the power
Committed patchset #8 (id:150001)
4 years, 9 months ago (2016-03-12 02:10:10 UTC) #26
commit-bot: I haz the power
4 years, 9 months ago (2016-03-12 02:12:22 UTC) #28
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/8f20e83de53c12033403e198b903f81112625d0b
Cr-Commit-Position: refs/heads/master@{#380835}

Powered by Google App Engine
This is Rietveld 408576698