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

Issue 1838083006: Fix a use-after-free error in WaitOrCountBookmarks (Closed)

Created:
4 years, 8 months ago by lwchkg
Modified:
4 years, 8 months ago
Reviewers:
Mike Lerman, vmpstr
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a use-after-free error in WaitOrCountBookmarks The use-after-free error is reproduced when WaitOrCountBookmarks is executed twice before the bookmark model is loaded. BUG=596693 TEST=Added a unit test, with patched code passing and unpatched code failing. Committed: https://crrev.com/592ca50b6619173d09a6531e4202d22f7e647c74 Cr-Commit-Position: refs/heads/master@{#385528}

Patch Set 1 #

Patch Set 2 : Add testing #

Total comments: 2

Patch Set 3 : The test now checks that the bookmarking test runs exactly once. #

Total comments: 2

Patch Set 4 : Rebase and update conflicting code #

Patch Set 5 : Fix errors in code. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -1 line) Patch
M chrome/browser/profiles/profile_statistics_aggregator.cc View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_statistics_unittest.cc View 1 2 3 4 2 chunks +96 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (12 generated)
lwchkg
Dear all, PTAL. Regards, WC Leung.
4 years, 8 months ago (2016-03-30 15:53:27 UTC) #3
Mike Lerman
On 2016/03/30 15:53:27, lwchkg wrote: > Dear all, > > PTAL. > > Regards, > ...
4 years, 8 months ago (2016-03-30 16:05:19 UTC) #4
lwchkg
Uploaded a new patch with the unit test. FYI, some testing code is adapted from ...
4 years, 8 months ago (2016-03-31 17:29:44 UTC) #5
Mike Lerman
https://codereview.chromium.org/1838083006/diff/20001/chrome/browser/profiles/profile_statistics_unittest.cc File chrome/browser/profiles/profile_statistics_unittest.cc (right): https://codereview.chromium.org/1838083006/diff/20001/chrome/browser/profiles/profile_statistics_unittest.cc#newcode145 chrome/browser/profiles/profile_statistics_unittest.cc:145: // Load the bookmark model to allow the bookmark ...
4 years, 8 months ago (2016-04-04 15:38:58 UTC) #6
lwchkg
New patch uploaded. https://codereview.chromium.org/1838083006/diff/20001/chrome/browser/profiles/profile_statistics_unittest.cc File chrome/browser/profiles/profile_statistics_unittest.cc (right): https://codereview.chromium.org/1838083006/diff/20001/chrome/browser/profiles/profile_statistics_unittest.cc#newcode145 chrome/browser/profiles/profile_statistics_unittest.cc:145: // Load the bookmark model to ...
4 years, 8 months ago (2016-04-04 19:29:03 UTC) #7
Mike Lerman
https://codereview.chromium.org/1838083006/diff/40001/chrome/browser/profiles/profile_statistics_unittest.cc File chrome/browser/profiles/profile_statistics_unittest.cc (right): https://codereview.chromium.org/1838083006/diff/40001/chrome/browser/profiles/profile_statistics_unittest.cc#newcode158 chrome/browser/profiles/profile_statistics_unittest.cc:158: scoped_refptr<ProfileStatisticsAggregator> aggregator_scoped = Why delete this aggregator? It won't ...
4 years, 8 months ago (2016-04-04 20:26:27 UTC) #8
lwchkg
https://codereview.chromium.org/1838083006/diff/40001/chrome/browser/profiles/profile_statistics_unittest.cc File chrome/browser/profiles/profile_statistics_unittest.cc (right): https://codereview.chromium.org/1838083006/diff/40001/chrome/browser/profiles/profile_statistics_unittest.cc#newcode158 chrome/browser/profiles/profile_statistics_unittest.cc:158: scoped_refptr<ProfileStatisticsAggregator> aggregator_scoped = On 2016/04/04 20:26:27, Mike Lerman wrote: ...
4 years, 8 months ago (2016-04-04 23:22:52 UTC) #9
Mike Lerman
okay, lgtm.
4 years, 8 months ago (2016-04-05 18:04:42 UTC) #10
lwchkg
Just tested with unpatched code failed with a crash dump similar to the bug report's. ...
4 years, 8 months ago (2016-04-06 15:08:25 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1838083006/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1838083006/40001
4 years, 8 months ago (2016-04-06 15:08:49 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/206508)
4 years, 8 months ago (2016-04-06 15:19:15 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1838083006/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1838083006/60001
4 years, 8 months ago (2016-04-06 17:54:36 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_ng/builds/74630) mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 8 months ago (2016-04-06 18:21:25 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1838083006/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1838083006/80001
4 years, 8 months ago (2016-04-06 18:56:42 UTC) #24
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 8 months ago (2016-04-06 19:54:04 UTC) #26
commit-bot: I haz the power
4 years, 8 months ago (2016-04-06 19:55:42 UTC) #28
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/592ca50b6619173d09a6531e4202d22f7e647c74
Cr-Commit-Position: refs/heads/master@{#385528}

Powered by Google App Engine
This is Rietveld 408576698