Note: Google Test filter = *OnDragSessionCloseUseAfterFree* [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from XdgVersionStableTest/WaylandDataDragControllerTest [ RUN ] XdgVersionStableTest/WaylandDataDragControllerTest.OnDragSessionCloseUseAfterFree/0 [987:987:WARNING:ui/ozone/platform/wayland/gpu/wayland_buffer_manager_gpu.cc:456] Failed to initialize drm render node handle. [987:987:WARNING:ui/ozone/platform/wayland/common/wayland_object.cc:119] Binding to wl_shm version 1 but version 2 is available. [987:987:WARNING:ui/ozone/platform/wayland/common/wayland_object.cc:119] Binding to zwp_pointer_gestures_v1 version 1 but version 3 is available. [987:987:WARNING:ui/ozone/platform/wayland/host/wayland_surface.cc:200] Server doesn't support wp_content_type_v1 [987:987:WARNING:ui/ozone/platform/wayland/host/wayland_surface.cc:214] Server doesn't support wp_color_management_surface_v1. GMOCK WARNING: Uninteresting mock function call - returning directly. Function call: TokenCommit(0x7662c280c3c0, 0x7612c27f9900) NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details. GMOCK WARNING: Uninteresting mock function call - returning directly. Function call: Activate(0x7662c280c3c0, 0x7612c27f8e80, 0x7662c2817d9c pointing to "", 0x7612c27f9000) NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details. GMOCK WARNING: Uninteresting mock function call - returning directly. Function call: OnDragEnter(@0x7552c1383760 0,0, 0, 0) NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details. GMOCK WARNING: Uninteresting mock function call - returning directly. Function call: MockOnDragDataAvailable() NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details. GMOCK WARNING: Uninteresting mock function call - returning directly. Function call: MockDragMotion(@0x7552c1383f20 0,0, 0, 0) NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details. GMOCK WARNING: Uninteresting mock function call - returning directly. Function call: Run(kNone) NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details. ================================================================= ==987==ERROR: AddressSanitizer: heap-use-after-free on address 0x76e2c27e6bc0 at pc 0x5ad564b3d105 bp 0x7ffd5ee91db0 sp 0x7ffd5ee91da8 READ of size 8 at 0x76e2c27e6bc0 thread T0 #0 0x5ad564b3d104 in ui::WaylandWindow::OnDragSessionClose(ui::mojom::DragOperation) base/memory/scoped_refptr.h:319:43 #1 0x5ad564a81bcf in ui::WaylandDataDragController::HandleDragEnd(ui::WaylandDataDragController::DragResult, base::TimeTicks) ui/ozone/platform/wayland/host/wayland_data_drag_controller.cc:868:21 #2 0x5ad564a876f5 in ui::WaylandDataDragController::OnDataSourceFinish(wl::DataSource*, base::TimeTicks, bool) ui/ozone/platform/wayland/host/wayland_data_drag_controller.cc:597:3 #3 0x5ad564a91da2 in wl::DataSource::HandleFinishEvent(bool) ui/ozone/platform/wayland/host/wayland_data_source.cc:73:14 #4 0x5ad568de6df4 in ffi_call_unix64 crtstuff.c 0x76e2c27e6bc0 is located 576 bytes inside of 1056-byte region [0x76e2c27e6980,0x76e2c27e6da0) freed by thread T0 here: #0 0x5ad562479716 in operator delete(void*, unsigned long) (/chromium/chromium/src/out/asan/ozone_unittests+0x2a8b716) (BuildId: 987a1f11247d0fa7) #1 0x5ad56292df6f in testing::internal::FunctionMocker::PerformDefaultAction(std::__Cr::tuple&&, std::__Cr::basic_string, std::__Cr::allocator> const&) const third_party/libc++/src/include/__functional/function.h:502:12 #2 0x5ad56292d765 in testing::internal::FunctionMocker::InvokeWith(std::__Cr::tuple&&) third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h:1822:20 #3 0x5ad56291df25 in ui::MockPlatformWindowDelegate::DispatchEvent(ui::Event*) third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h:1548:12 #4 0x5ad564b49718 in base::internal::Invoker, base::internal::BindState>, void (ui::Event*)>::RunOnce(base::internal::BindStateBase*, ui::Event*) base/functional/bind_internal.h:740:12 #5 0x5ad5685e80a8 in ui::DispatchEventFromNativeUiEvent(ui::Event* const&, base::OnceCallback) base/functional/callback.h:155:12 #6 0x5ad564b3aab0 in ui::WaylandWindow::DispatchEvent(ui::Event* const&) ui/ozone/platform/wayland/host/wayland_window.cc:1079:24 #7 0x5ad56853e837 in ui::PlatformEventSource::DispatchEvent(ui::Event*) ui/events/platform/platform_event_source.cc:93:29 #8 0x5ad564a9f206 in ui::WaylandEventSource::SetTargetAndDispatchEvent(ui::Event*, ui::EventTarget*) ui/ozone/platform/wayland/host/wayland_event_source.cc:757:3 #9 0x5ad564aa00d9 in ui::WaylandEventSource::OnPointerButtonEvent(ui::EventType, int, base::TimeTicks, ui::WaylandWindow*, wl::EventDispatchPolicy, bool, bool) ui/ozone/platform/wayland/host/wayland_event_source.cc:420:7 #10 0x5ad564aaade8 in ui::WaylandEventSource::ReleasePressedPointerButtons(ui::WaylandWindow*, base::TimeTicks) ui/ozone/platform/wayland/host/wayland_event_source.cc:965:7 #11 0x5ad564b3cf21 in ui::WaylandWindow::OnDragSessionClose(ui::mojom::DragOperation) ui/ozone/platform/wayland/host/wayland_window.cc:927:35 #12 0x5ad564a81bcf in ui::WaylandDataDragController::HandleDragEnd(ui::WaylandDataDragController::DragResult, base::TimeTicks) ui/ozone/platform/wayland/host/wayland_data_drag_controller.cc:868:21 #13 0x5ad564a876f5 in ui::WaylandDataDragController::OnDataSourceFinish(wl::DataSource*, base::TimeTicks, bool) ui/ozone/platform/wayland/host/wayland_data_drag_controller.cc:597:3 #14 0x5ad564a91da2 in wl::DataSource::HandleFinishEvent(bool) ui/ozone/platform/wayland/host/wayland_data_source.cc:73:14 #15 0x5ad568de6df4 in ffi_call_unix64 crtstuff.c previously allocated by thread T0 here: #0 0x5ad562478b11 in operator new(unsigned long) (/chromium/chromium/src/out/asan/ozone_unittests+0x2a8ab11) (BuildId: 987a1f11247d0fa7) #1 0x5ad564b5f681 in ui::WaylandWindow::Create(ui::PlatformWindowDelegate*, ui::WaylandConnection*, ui::PlatformWindowInitProperties) third_party/libc++/src/include/__memory/unique_ptr.h:756:26 #2 0x5ad564184c4a in ui::MockWaylandPlatformWindowDelegate::CreateWaylandWindow(ui::WaylandConnection*, ui::PlatformWindowInitProperties) ui/ozone/platform/wayland/test/mock_wayland_platform_window_delegate.cc:47:17 #3 0x5ad562a2bc62 in ui::WaylandTestBase::SetUp() ui/ozone/platform/wayland/test/wayland_test.cc:81:17 #4 0x5ad562a206a9 in ui::WaylandDragDropTest::SetUp() ui/ozone/platform/wayland/test/wayland_drag_drop_test.cc:226:16 #5 0x5ad562540807 in ui::WaylandDataDragControllerTest::SetUp() ui/ozone/platform/wayland/host/wayland_data_drag_controller_unittest.cc:151:26 #6 0x5ad563361b21 in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc #7 0x5ad5633648e7 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2892:11 #8 0x5ad5633669e3 in testing::TestSuite::Run() third_party/googletest/src/googletest/src/gtest.cc:3070:30 #9 0x5ad563395e2a in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:6062:44 #10 0x5ad5633948fe in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc #11 0x5ad56577e55c in base::TestSuite::Run() base/test/test_suite.cc:440:16 #12 0x5ad56247a911 in base::internal::Invoker, base::internal::BindState>, int ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:740:12 #13 0x5ad565786eeb in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback, unsigned long, int, unsigned long, bool, base::RepeatingCallback, base::OnceCallback) base/functional/callback.h:155:12 #14 0x5ad56578680b in base::LaunchUnitTests(int, char**, base::OnceCallback, unsigned long) base/test/launcher/unit_test_launcher.cc:337:10 #15 0x5ad56247a1cb in main mojo/core/test/run_all_unittests.cc:30:10 #16 0x7952c3fd3249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 6196744a316dbd57c0fd8968df1680aac482cec4) SUMMARY: AddressSanitizer: heap-use-after-free base/memory/scoped_refptr.h:319:43 in ui::WaylandWindow::OnDragSessionClose(ui::mojom::DragOperation) Shadow bytes around the buggy address: 0x76e2c27e6900: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x76e2c27e6980: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x76e2c27e6a00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x76e2c27e6a80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x76e2c27e6b00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd =>0x76e2c27e6b80: fd fd fd fd fd fd fd fd[fd]fd fd fd fd fd fd fd 0x76e2c27e6c00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x76e2c27e6c80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x76e2c27e6d00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x76e2c27e6d80: fd fd fd fd fa fa fa fa fa fa fa fa fa fa fa fa 0x76e2c27e6e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==987==ADDITIONAL INFO ==987==Note: Please include this section with the ASan report. Task trace: #0 0x5ad562a218ea in ui::WaylandDragDropTest::MaybeRunScheduledTasks() ui/ozone/platform/wayland/test/wayland_drag_drop_test.cc:257:7 ==987==END OF ADDITIONAL INFO ==987==ABORTING