Note: Google Test filter = *HandleToplevelConfigureSurvivesSyncCloseOnDeactivate* [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from XdgVersionStableTest/WaylandWindowTest [ RUN ] XdgVersionStableTest/WaylandWindowTest.HandleToplevelConfigureSurvivesSyncCloseOnDeactivate/0 [121137:121137:WARNING:ui/ozone/platform/wayland/gpu/wayland_buffer_manager_gpu.cc:456] Failed to initialize drm render node handle. [121137:121137:WARNING:ui/ozone/platform/wayland/common/wayland_object.cc:119] Binding to wl_shm version 1 but version 2 is available. [121137:121137:WARNING:ui/ozone/platform/wayland/common/wayland_object.cc:119] Binding to zwp_pointer_gestures_v1 version 1 but version 3 is available. [121137:121137:WARNING:ui/ozone/platform/wayland/host/wayland_surface.cc:200] Server doesn't support wp_content_type_v1 [121137:121137: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(0x7101a2a0c3c0, 0x70b1a29f9900) 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(0x7101a2a0c3c0, 0x70b1a29f8e80, 0x7101a2a1829c pointing to "", 0x70b1a29f9000) 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. ================================================================= ==121137==ERROR: AddressSanitizer: heap-use-after-free on address 0x7181a29e6c30 at pc 0x62f744dcd91c bp 0x7ffde9c27130 sp 0x7ffde9c27128 READ of size 8 at 0x7181a29e6c30 thread T0 #0 0x62f744dcd91b in ui::WaylandToplevelWindow::UpdateSessionStateIfNeeded() third_party/libc++/src/include/__memory/unique_ptr.h:275:12 #1 0x62f742b3471c in ui::WaylandWindowTest_HandleToplevelConfigureSurvivesSyncCloseOnDeactivate_Test::TestBody() ui/ozone/platform/wayland/host/wayland_window_unittest.cc:5463:15 #2 0x62f74360448b in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc #3 0x62f7436070e7 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2892:11 #4 0x62f7436091e3 in testing::TestSuite::Run() third_party/googletest/src/googletest/src/gtest.cc:3070:30 #5 0x62f74363862a in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:6062:44 #6 0x62f7436370fe in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc #7 0x62f745a20e7c in base::TestSuite::Run() base/test/test_suite.cc:440:16 #8 0x62f74271cc91 in base::internal::Invoker, base::internal::BindState>, int ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:740:12 #9 0x62f745a2980b in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback, unsigned long, int, unsigned long, bool, base::RepeatingCallback, base::OnceCallback) base/functional/callback.h:155:12 #10 0x62f745a2912b in base::LaunchUnitTests(int, char**, base::OnceCallback, unsigned long) base/test/launcher/unit_test_launcher.cc:337:10 #11 0x62f74271c54b in main mojo/core/test/run_all_unittests.cc:30:10 #12 0x73f1a40d8249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 6196744a316dbd57c0fd8968df1680aac482cec4) 0x7181a29e6c30 is located 688 bytes inside of 1056-byte region [0x7181a29e6980,0x7181a29e6da0) freed by thread T0 here: #0 0x62f74271ba96 in operator delete(void*, unsigned long) (/chromium/chromium/src/out/asan/ozone_unittests+0x2a8ba96) (BuildId: 13b1353f9128d32f) #1 0x62f742bea094 in testing::internal::FunctionMocker::InvokeWith(std::__Cr::tuple&&) third_party/libc++/src/include/__functional/function.h:502:12 #2 0x62f742bc0453 in ui::MockPlatformWindowDelegate::OnActivationChanged(bool) third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h:1548:12 #3 0x62f744dcea0b in ui::WaylandToplevelWindow::HandleToplevelConfigureWithOrigin(int, int, int, int, ui::WaylandWindow::WindowStates const&) ui/ozone/platform/wayland/host/wayland_toplevel_window.cc:570:3 #4 0x62f744dcd347 in ui::WaylandToplevelWindow::HandleToplevelConfigure(int, int, ui::WaylandWindow::WindowStates const&) ui/ozone/platform/wayland/host/wayland_toplevel_window.cc:468:3 #5 0x62f742b3471c in ui::WaylandWindowTest_HandleToplevelConfigureSurvivesSyncCloseOnDeactivate_Test::TestBody() ui/ozone/platform/wayland/host/wayland_window_unittest.cc:5463:15 #6 0x62f74360448b in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc #7 0x62f7436070e7 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2892:11 #8 0x62f7436091e3 in testing::TestSuite::Run() third_party/googletest/src/googletest/src/gtest.cc:3070:30 #9 0x62f74363862a in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:6062:44 #10 0x62f7436370fe in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc #11 0x62f745a20e7c in base::TestSuite::Run() base/test/test_suite.cc:440:16 #12 0x62f74271cc91 in base::internal::Invoker, base::internal::BindState>, int ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:740:12 #13 0x62f745a2980b in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback, unsigned long, int, unsigned long, bool, base::RepeatingCallback, base::OnceCallback) base/functional/callback.h:155:12 #14 0x62f745a2912b in base::LaunchUnitTests(int, char**, base::OnceCallback, unsigned long) base/test/launcher/unit_test_launcher.cc:337:10 #15 0x62f74271c54b in main mojo/core/test/run_all_unittests.cc:30:10 #16 0x73f1a40d8249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 6196744a316dbd57c0fd8968df1680aac482cec4) previously allocated by thread T0 here: #0 0x62f74271ae91 in operator new(unsigned long) (/chromium/chromium/src/out/asan/ozone_unittests+0x2a8ae91) (BuildId: 13b1353f9128d32f) #1 0x62f744e01fa1 in ui::WaylandWindow::Create(ui::PlatformWindowDelegate*, ui::WaylandConnection*, ui::PlatformWindowInitProperties) third_party/libc++/src/include/__memory/unique_ptr.h:756:26 #2 0x62f74442744a in ui::MockWaylandPlatformWindowDelegate::CreateWaylandWindow(ui::WaylandConnection*, ui::PlatformWindowInitProperties) ui/ozone/platform/wayland/test/mock_wayland_platform_window_delegate.cc:47:17 #3 0x62f742cce462 in ui::WaylandTestBase::SetUp() ui/ozone/platform/wayland/test/wayland_test.cc:81:17 #4 0x62f742b37065 in ui::WaylandWindowTest::SetUp() ui/ozone/platform/wayland/host/wayland_window_unittest.cc:212:18 #5 0x62f743604321 in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc #6 0x62f7436070e7 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2892:11 #7 0x62f7436091e3 in testing::TestSuite::Run() third_party/googletest/src/googletest/src/gtest.cc:3070:30 #8 0x62f74363862a in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:6062:44 #9 0x62f7436370fe in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc #10 0x62f745a20e7c in base::TestSuite::Run() base/test/test_suite.cc:440:16 #11 0x62f74271cc91 in base::internal::Invoker, base::internal::BindState>, int ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:740:12 #12 0x62f745a2980b in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback, unsigned long, int, unsigned long, bool, base::RepeatingCallback, base::OnceCallback) base/functional/callback.h:155:12 #13 0x62f745a2912b in base::LaunchUnitTests(int, char**, base::OnceCallback, unsigned long) base/test/launcher/unit_test_launcher.cc:337:10 #14 0x62f74271c54b in main mojo/core/test/run_all_unittests.cc:30:10 #15 0x73f1a40d8249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 6196744a316dbd57c0fd8968df1680aac482cec4) SUMMARY: AddressSanitizer: heap-use-after-free third_party/libc++/src/include/__memory/unique_ptr.h:275:12 in ui::WaylandToplevelWindow::UpdateSessionStateIfNeeded() Shadow bytes around the buggy address: 0x7181a29e6980: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7181a29e6a00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7181a29e6a80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7181a29e6b00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7181a29e6b80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd =>0x7181a29e6c00: fd fd fd fd fd fd[fd]fd fd fd fd fd fd fd fd fd 0x7181a29e6c80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7181a29e6d00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7181a29e6d80: fd fd fd fd fa fa fa fa fa fa fa fa fa fa fa fa 0x7181a29e6e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x7181a29e6e80: 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 ==121137==ADDITIONAL INFO ==121137==Note: Please include this section with the ASan report. Task trace: ==121137==END OF ADDITIONAL INFO ==121137==ABORTING