New issue
Advanced search Search tips

Issue 878314 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 28
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

[ASan] WidgetTest.WidgetDestroyedItselfDoesNotCrash crashes in ChromeOS

Project Member Reported by fbeaufort@chromium.org, Aug 28

Issue description

After https://chromium-review.googlesource.com/c/chromium/src/+/1145261/ lands, we should fix native_widget_aura.cc and mac too as WidgetTest.WidgetDestroyedItselfDoesNotCrash crashes with ASan.

https://cs.chromium.org/chromium/src/ui/views/widget/native_widget_aura.cc?l=898 and https://cs.chromium.org/chromium/src/ui/views/widget/native_widget_mac.mm?l=120 shall be updated to something similar to:


  // |OnNativeWidgetDestroyed| may delete |this| if the object does not own
  // itself.
  bool should_delete_this =
      (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET);
  native_widget_delegate_->OnNativeWidgetDestroyed();
  if (should_delete_this)
    delete this;

 
Status: Started (was: Untriaged)
WIP at https://chromium-review.googlesource.com/c/chromium/src/+/1193283
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 28

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

commit e34ae84a36ab96282f2c99a801d185606d6faf67
Author: François Beaufort <beaufort.francois@gmail.com>
Date: Tue Aug 28 13:44:52 2018

Fix ASan WidgetTest.WidgetDestroyedItselfDoesNotCrash crash.

This makes sure WidgetTest.WidgetDestroyedItselfDoesNotCrash test does NOT
crash with use-after-free ASan error in ChromeOS and Mac. Test was added in
https://chromium-review.googlesource.com/c/chromium/src/+/1145261/ and only
covered Windows and Linux.

Bug:  878314 

Change-Id: Ifde7f402955bd34bfd0618e4f67c52feeb333624
Reviewed-on: https://chromium-review.googlesource.com/1193283
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586678}
[modify] https://crrev.com/e34ae84a36ab96282f2c99a801d185606d6faf67/ui/views/widget/native_widget_aura.cc
[modify] https://crrev.com/e34ae84a36ab96282f2c99a801d185606d6faf67/ui/views/widget/native_widget_mac.mm

Status: Fixed (was: Started)

Sign in to add a comment