New issue
Advanced search Search tips

Issue 601315 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

MacViews: Failing views_unittests with asan enabled

Project Member Reported by karandeepb@chromium.org, Apr 7 2016

Issue description

Version: 51.0.2689.0 
OS: Mac OS 10.11.3


Following views_unittests currently fail on MacViews with asan enabled due to "use-after-free" errors-
  -MenuRunnerTest.AsynchronousKeyEventHandling 
  -MenuRunnerTest.LatinMnemonic 
  -MenuRunnerTest.NonLatinMnemonic 


 
Owner: karandeepb@chromium.org
Status: Started (was: Available)
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aa336ae9f9b653825af2c70bdf59593fd58e886a

commit aa336ae9f9b653825af2c70bdf59593fd58e886a
Author: karandeepb <karandeepb@chromium.org>
Date: Mon Apr 11 01:20:33 2016

MacViews: Fix MenuRunnerTests which fail with asan enabled.

This CL fixes the following tests which fail due to use-after-free errors when
asan is enabled -
  -MenuRunnerTest.AsynchronousKeyEventHandling
  -MenuRunnerTest.LatinMnemonic
  -MenuRunnerTest.NonLatinMnemonic

These fail on the events dispatched by ui::test::EventGenerator. The reason for
the failures is that the call to TerminateNestedMessageLoopIfNecessary() in
MenuController::OnWillDispatchKeyEvent is unsafe, since the MenuController might
by deleted by the calls to SelectByChar(..) or OnKeyDown(..). These failures are
not experienced on platforms other than Mac, due to the differences in event
processing pipelines.

This CL fixes the tests by checking that the current MenuController instance is
alive before calling TerminateNestedMessageLoopIfNecessary().

BUG= 601315 

Review URL: https://codereview.chromium.org/1863393006

Cr-Commit-Position: refs/heads/master@{#386323}

[modify] https://crrev.com/aa336ae9f9b653825af2c70bdf59593fd58e886a/ui/views/controls/menu/menu_controller.cc

Status: Fixed (was: Started)
Labels: -Hotlist-MacViews Proj-MacViews

Sign in to add a comment