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 2593613003: Fix use-after-free in WidgetCaptureTest.SetCaptureToNonToplevel. (Closed)

Created:
4 years ago by krasin1
Modified:
4 years ago
Reviewers:
sadrul
CC:
chromium-reviews, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix use-after-free in WidgetCaptureTest.SetCaptureToNonToplevel. This test case calls AddObserver with a pointer to a local variable. The observer is then called during the test instance destruction, when the local variable is already out of scope. The fix is to call RemoveObserver while the observer variable is still alive. The bug was found by AddressSanitizer with use-after-scope check enabled. BUG=649897 Committed: https://crrev.com/f51080b57ed7b3570a7a890b6ad5ef4ddf49747e Cr-Commit-Position: refs/heads/master@{#440001}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -0 lines) Patch
M ui/views/widget/widget_interactive_uitest.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (9 generated)
krasin1
4 years ago (2016-12-20 23:15:49 UTC) #2
sadrul
lgtm Thanks!
4 years ago (2016-12-21 02:06:38 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2593613003/1
4 years ago (2016-12-21 03:39:14 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years ago (2016-12-21 03:44:15 UTC) #12
commit-bot: I haz the power
4 years ago (2016-12-21 03:48:10 UTC) #14
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/f51080b57ed7b3570a7a890b6ad5ef4ddf49747e
Cr-Commit-Position: refs/heads/master@{#440001}

Powered by Google App Engine
This is Rietveld 408576698