Note: Google Test filter = WaylandPointerTest.FrameTargetUseAfterFreeOnSyncWindowClose [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from WaylandPointerTest [ RUN ] WaylandPointerTest.FrameTargetUseAfterFreeOnSyncWindowClose [2030:2030:WARNING:ui/ozone/platform/wayland/gpu/wayland_buffer_manager_gpu.cc:456] Failed to initialize drm render node handle. [2030:2030:WARNING:ui/ozone/platform/wayland/common/wayland_object.cc:119] Binding to wl_shm version 1 but version 2 is available. [2030:2030:WARNING:ui/ozone/platform/wayland/common/wayland_object.cc:119] Binding to zwp_pointer_gestures_v1 version 1 but version 3 is available. [2030:2030:WARNING:ui/ozone/platform/wayland/host/wayland_surface.cc:200] Server doesn't support wp_content_type_v1 [2030:2030: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(0x7b76e8a0d7c0, 0x7b26e89f9900) 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(0x7b76e8a0d7c0, 0x7b26e89f8e80, 0x7b76e8a17b1c pointing to "", 0x7b26e89f9000) 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. ================================================================= ==2030==ERROR: AddressSanitizer: heap-use-after-free on address 0x7bf6e89e6980 at pc 0x5d37c3b46073 bp 0x7ffc35710530 sp 0x7ffc35710528 READ of size 8 at 0x7bf6e89e6980 thread T0 #0 0x5d37c3b46072 in ui::WaylandEventSource::SetTargetAndDispatchEvent(ui::Event*, ui::EventTarget*) ui/ozone/platform/wayland/host/wayland_event_source.cc:110:18 #1 0x5d37c3b496dc in ui::WaylandEventSource::OnPointerFrameEvent() ui/ozone/platform/wayland/host/wayland_event_source.cc:563:5 #2 0x5d37c7ef6aa4 in ffi_call_unix64 crtstuff.c 0x7bf6e89e6980 is located 0 bytes inside of 1056-byte region [0x7bf6e89e6980,0x7bf6e89e6da0) freed by thread T0 here: #0 0x5d37c15e8716 in operator delete(void*, unsigned long) (/chromium/chromium/src/out/asan/ozone_unittests+0x2acd716) (BuildId: 65697234005c98b9) #1 0x5d37c1ab0240 in testing::internal::FunctionMocker::InvokeWith(std::__Cr::tuple&&) third_party/libc++/src/include/__functional/function.h:502:12 #2 0x5d37c1aa0865 in ui::MockPlatformWindowDelegate::DispatchEvent(ui::Event*) third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h:1548:12 #3 0x5d37c3befdb8 in base::internal::Invoker, base::internal::BindState>, void (ui::Event*)>::RunOnce(base::internal::BindStateBase*, ui::Event*) base/functional/bind_internal.h:740:12 #4 0x5d37c76f9176 in base::OnceCallback::Run(ui::Event*) && base/functional/callback.h:155:12 #5 0x5d37c76f8de4 in ui::DispatchEventFromNativeUiEvent(ui::Event* const&, base::OnceCallback) ui/events/ozone/events_ozone.cc:45:25 #6 0x5d37c3be1150 in ui::WaylandWindow::DispatchEvent(ui::Event* const&) ui/ozone/platform/wayland/host/wayland_window.cc:1079:24 #7 0x5d37c764f297 in ui::PlatformEventSource::DispatchEvent(ui::Event*) ui/events/platform/platform_event_source.cc:93:29 #8 0x5d37c3b45d86 in ui::WaylandEventSource::SetTargetAndDispatchEvent(ui::Event*, ui::EventTarget*) ui/ozone/platform/wayland/host/wayland_event_source.cc:761:3 #9 0x5d37c3b496dc in ui::WaylandEventSource::OnPointerFrameEvent() ui/ozone/platform/wayland/host/wayland_event_source.cc:563:5 #10 0x5d37c7ef6aa4 in ffi_call_unix64 crtstuff.c previously allocated by thread T0 here: #0 0x5d37c15e7b11 in operator new(unsigned long) (/chromium/chromium/src/out/asan/ozone_unittests+0x2accb11) (BuildId: 65697234005c98b9) #1 0x5d37c3c05d21 in ui::WaylandWindow::Create(ui::PlatformWindowDelegate*, ui::WaylandConnection*, ui::PlatformWindowInitProperties) third_party/libc++/src/include/__memory/unique_ptr.h:756:26 #2 0x5d37c3d29984 in ui::MockWaylandPlatformWindowDelegate::CreateWaylandWindow(ui::WaylandConnection*, ui::PlatformWindowInitProperties) ui/ozone/platform/wayland/test/mock_wayland_platform_window_delegate.cc:38:17 #3 0x5d37c1bb0e32 in ui::WaylandTestBase::SetUp() ui/ozone/platform/wayland/test/wayland_test.cc:81:17 #4 0x5d37c18237cd in ui::WaylandPointerTest::SetUp() ui/ozone/platform/wayland/host/wayland_pointer_unittest.cc:45:24 #5 0x5d37c24da411 in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc #6 0x5d37c24dd1d7 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2892:11 #7 0x5d37c24df2d3 in testing::TestSuite::Run() third_party/googletest/src/googletest/src/gtest.cc:3070:30 #8 0x5d37c250e80a in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:6062:44 #9 0x5d37c250d2de in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc #10 0x5d37c490339c in base::TestSuite::Run() base/test/test_suite.cc:440:16 #11 0x5d37c15e9911 in base::internal::Invoker, base::internal::BindState>, int ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:740:12 #12 0x5d37c490bd24 in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback, unsigned long, int, unsigned long, bool, base::RepeatingCallback, base::OnceCallback) base/functional/callback.h:155:12 #13 0x5d37c490b64b in base::LaunchUnitTests(int, char**, base::OnceCallback, unsigned long) base/test/launcher/unit_test_launcher.cc:337:10 #14 0x5d37c15e91cb in main mojo/core/test/run_all_unittests.cc:30:10 #15 0x7e66ea1a8249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 6196744a316dbd57c0fd8968df1680aac482cec4) SUMMARY: AddressSanitizer: heap-use-after-free ui/ozone/platform/wayland/host/wayland_event_source.cc:110:18 in ui::WaylandEventSource::SetTargetAndDispatchEvent(ui::Event*, ui::EventTarget*) Shadow bytes around the buggy address: 0x7bf6e89e6700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x7bf6e89e6780: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc 0x7bf6e89e6800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc 0x7bf6e89e6880: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x7bf6e89e6900: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x7bf6e89e6980:[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7bf6e89e6a00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7bf6e89e6a80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7bf6e89e6b00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7bf6e89e6b80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7bf6e89e6c00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 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 ==2030==ADDITIONAL INFO ==2030==Note: Please include this section with the ASan report. Task trace: ==2030==END OF ADDITIONAL INFO ==2030==ABORTING