IMPORTANT DEBUGGING NOTE: batches of tests are run inside their own process. For debugging a test inside a debugger, use the --gtest_filter= flag along with --single-process-tests. Using sharding settings from environment. This is shard 0/1 Using 1 parallel jobs. Note: Google Test filter = X11WindowOzoneTest.OnWindowMappedUseAfterFreeAfterMaximize [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from X11WindowOzoneTest [ RUN ] X11WindowOzoneTest.OnWindowMappedUseAfterFreeAfterMaximize ================================================================= ==971==ERROR: AddressSanitizer: heap-use-after-free on address 0x7bb58abe6e19 at pc 0x5bbd3845698f bp 0x7ffd841b7090 sp 0x7ffd841b7088 WRITE of size 1 at 0x7bb58abe6e19 thread T0 #0 0x5bbd3845698e in ui::X11Window::OnWindowMapped() ui/ozone/platform/x11/x11_window.cc:2445:32 #1 0x5bbd3844dcbf in ui::X11Window::HandleEvent(x11::Event const&) ui/ozone/platform/x11/x11_window.cc:2375:5 #2 0x5bbd3c80e93a in void base::ObserverList>::NotifyAllowReentrancy(T, x11::Event const&) third_party/libc++/src/include/__type_traits/invoke.h:90:27 #3 0x5bbd3c80ceeb in x11::Connection::DispatchEvent(x11::Event const&) ui/gfx/x/connection.cc:588:20 #4 0x5bbd36e2fca8 in ui::X11WindowOzoneTest_OnWindowMappedUseAfterFreeAfterMaximize_Test::TestBody() ui/ozone/platform/x11/x11_window_ozone_unittest.cc:465:15 #5 0x5bbd376a06eb in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc #6 0x5bbd376a28b7 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2892:11 #7 0x5bbd376a49b3 in testing::TestSuite::Run() third_party/googletest/src/googletest/src/gtest.cc:3070:30 #8 0x5bbd376d3dfa in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:6062:44 #9 0x5bbd376d28ce in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc #10 0x5bbd38fb097c in base::TestSuite::Run() base/test/test_suite.cc:440:16 #11 0x5bbd36d81811 in base::internal::Invoker, base::internal::BindState>, int ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:740:12 #12 0x5bbd38fb876b in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback, unsigned long, int, unsigned long, bool, base::RepeatingCallback, base::OnceCallback) base/functional/callback.h:155:12 #13 0x5bbd38fb808b in base::LaunchUnitTests(int, char**, base::OnceCallback, unsigned long) base/test/launcher/unit_test_launcher.cc:337:10 #14 0x5bbd36d810cb in main mojo/core/test/run_all_unittests.cc:30:10 #15 0x7e558c450249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 6196744a316dbd57c0fd8968df1680aac482cec4) 0x7bb58abe6e19 is located 409 bytes inside of 600-byte region [0x7bb58abe6c80,0x7bb58abe6ed8) freed by thread T0 here: #0 0x5bbd36d80616 in operator delete(void*, unsigned long) (/chromium/chromium/src/out/asan/ozone_x11_unittests+0x28fa616) (BuildId: b6a101affce495ee) #1 0x5bbd36e422f4 in testing::internal::FunctionMocker::InvokeWith(std::__Cr::tuple&&) third_party/libc++/src/include/__functional/function.h:502:12 #2 0x5bbd36e381b2 in ui::MockPlatformWindowDelegate::OnBoundsChanged(ui::PlatformWindowDelegate::BoundsChange const&) third_party/googletest/src/googlemock/include/gmock/gmock-spec-builders.h:1548:12 #3 0x5bbd38454708 in ui::X11Window::OnBoundsChanged(std::__Cr::optional const&, gfx::Rect const&) ui/ozone/platform/x11/x11_window.cc:2624:30 #4 0x5bbd3845cb15 in base::internal::Invoker const&, gfx::Rect const&), ui::X11Window*>, base::internal::BindState const&, gfx::Rect const&), base::internal::UnretainedWrapper>, void (std::__Cr::optional const&, gfx::Rect const&)>::Run(base::internal::BindStateBase*, std::__Cr::optional const&, gfx::Rect const&) base/functional/bind_internal.h:740:12 #5 0x5bbd3c831532 in base::RepeatingCallback const&, gfx::Rect const&)>::Run(std::__Cr::optional const&, gfx::Rect const&) const & base/functional/callback.h:346:12 #6 0x5bbd3c83126e in x11::GeometryCache::NotifyGeometryChanged() ui/gfx/x/geometry_cache.cc:131:28 #7 0x5bbd3c8329c0 in base::internal::Invoker const&, gfx::Rect const&), base::WeakPtr const&>, base::internal::BindState const&, gfx::Rect const&), base::WeakPtr>, void (std::__Cr::optional const&, gfx::Rect const&)>::Run(base::internal::BindStateBase*, std::__Cr::optional const&, gfx::Rect const&) base/functional/bind_internal.h:740:12 #8 0x5bbd3c831532 in base::RepeatingCallback const&, gfx::Rect const&)>::Run(std::__Cr::optional const&, gfx::Rect const&) const & base/functional/callback.h:346:12 #9 0x5bbd3c83126e in x11::GeometryCache::NotifyGeometryChanged() ui/gfx/x/geometry_cache.cc:131:28 #10 0x5bbd3c8329c0 in base::internal::Invoker const&, gfx::Rect const&), base::WeakPtr const&>, base::internal::BindState const&, gfx::Rect const&), base::WeakPtr>, void (std::__Cr::optional const&, gfx::Rect const&)>::Run(base::internal::BindStateBase*, std::__Cr::optional const&, gfx::Rect const&) base/functional/bind_internal.h:740:12 #11 0x5bbd3c831532 in base::RepeatingCallback const&, gfx::Rect const&)>::Run(std::__Cr::optional const&, gfx::Rect const&) const & base/functional/callback.h:346:12 #12 0x5bbd3c83126e in x11::GeometryCache::NotifyGeometryChanged() ui/gfx/x/geometry_cache.cc:131:28 #13 0x5bbd3c82fb73 in x11::GeometryCache::OnGetGeometryResponse(x11::Response) ui/gfx/x/geometry_cache.cc:101:3 #14 0x5bbd3c83261c in base::internal::Invoker), base::WeakPtr&&>, base::internal::BindState), base::WeakPtr>, void (x11::Response)>::RunOnce(base::internal::BindStateBase*, x11::Response&&) base/functional/bind_internal.h:740:12 #15 0x5bbd3c833845 in base::OnceCallback)>::Run(x11::Response) && base/functional/callback.h:155:12 #16 0x5bbd3c833fd9 in x11::Future::OnResponse(base::OnceCallback)>)::'lambda'(base::OnceCallback)>, scoped_refptr, std::__Cr::unique_ptr>)::operator()(base::OnceCallback)>, scoped_refptr, std::__Cr::unique_ptr>) const ui/gfx/x/future.h:142:27 #17 0x5bbd3c833ce2 in base::internal::Invoker::OnResponse(base::OnceCallback)>)::'lambda'(base::OnceCallback)>, scoped_refptr, std::__Cr::unique_ptr>)&&, base::OnceCallback)>&&>, base::internal::BindState::OnResponse(base::OnceCallback)>)::'lambda'(base::OnceCallback)>, scoped_refptr, std::__Cr::unique_ptr>), base::OnceCallback)>>, void (scoped_refptr, std::__Cr::unique_ptr>)>::RunOnce(base::internal::BindStateBase*, scoped_refptr&&, std::__Cr::unique_ptr>&&) base/functional/bind_internal.h:658:12 #18 0x5bbd3c811df2 in base::OnceCallback, std::__Cr::unique_ptr>)>::Run(scoped_refptr, std::__Cr::unique_ptr>) && base/functional/callback.h:155:12 #19 0x5bbd3c82d23d in x11::FutureImpl::ProcessResponse() ui/gfx/x/future.cc:62:8 #20 0x5bbd3c82e7ae in x11::FutureBase::DispatchNow() ui/gfx/x/future.cc:27:3 #21 0x5bbd3c83023b in x11::GeometryCache::GetBoundsPx() ui/gfx/x/geometry_cache.cc:46:22 #22 0x5bbd3c8302bf in x11::GeometryCache::GetBoundsPx() ui/gfx/x/geometry_cache.cc:56:33 #23 0x5bbd3c8302bf in x11::GeometryCache::GetBoundsPx() ui/gfx/x/geometry_cache.cc:56:33 #24 0x5bbd38440ce0 in ui::X11Window::Maximize() ui/ozone/platform/x11/x11_window.cc:789:32 #25 0x5bbd384567e7 in ui::X11Window::OnWindowMapped() ui/ozone/platform/x11/x11_window.cc:2444:5 #26 0x5bbd3844dcbf in ui::X11Window::HandleEvent(x11::Event const&) ui/ozone/platform/x11/x11_window.cc:2375:5 #27 0x5bbd3c80e93a in void base::ObserverList>::NotifyAllowReentrancy(T, x11::Event const&) third_party/libc++/src/include/__type_traits/invoke.h:90:27 #28 0x5bbd3c80ceeb in x11::Connection::DispatchEvent(x11::Event const&) ui/gfx/x/connection.cc:588:20 #29 0x5bbd36e2fca8 in ui::X11WindowOzoneTest_OnWindowMappedUseAfterFreeAfterMaximize_Test::TestBody() ui/ozone/platform/x11/x11_window_ozone_unittest.cc:465:15 previously allocated by thread T0 here: #0 0x5bbd36d7fa11 in operator new(unsigned long) (/chromium/chromium/src/out/asan/ozone_x11_unittests+0x28f9a11) (BuildId: b6a101affce495ee) #1 0x5bbd36e28d54 in ui::X11WindowOzoneTest::CreatePlatformWindow(ui::MockPlatformWindowDelegate*, gfx::Rect const&, unsigned int*, ui::X11ExtensionDelegate*) third_party/libc++/src/include/__memory/unique_ptr.h:756:26 #2 0x5bbd36e2f596 in ui::X11WindowOzoneTest_OnWindowMappedUseAfterFreeAfterMaximize_Test::TestBody() ui/ozone/platform/x11/x11_window_ozone_unittest.cc:393:7 #3 0x5bbd376a06eb in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc #4 0x5bbd376a28b7 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2892:11 #5 0x5bbd376a49b3 in testing::TestSuite::Run() third_party/googletest/src/googletest/src/gtest.cc:3070:30 #6 0x5bbd376d3dfa in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:6062:44 #7 0x5bbd376d28ce in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc #8 0x5bbd38fb097c in base::TestSuite::Run() base/test/test_suite.cc:440:16 #9 0x5bbd36d81811 in base::internal::Invoker, base::internal::BindState>, int ()>::RunOnce(base::internal::BindStateBase*) base/functional/bind_internal.h:740:12 #10 0x5bbd38fb876b in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback, unsigned long, int, unsigned long, bool, base::RepeatingCallback, base::OnceCallback) base/functional/callback.h:155:12 #11 0x5bbd38fb808b in base::LaunchUnitTests(int, char**, base::OnceCallback, unsigned long) base/test/launcher/unit_test_launcher.cc:337:10 #12 0x5bbd36d810cb in main mojo/core/test/run_all_unittests.cc:30:10 #13 0x7e558c450249 (/lib/x86_64-linux-gnu/libc.so.6+0x27249) (BuildId: 6196744a316dbd57c0fd8968df1680aac482cec4) SUMMARY: AddressSanitizer: heap-use-after-free ui/ozone/platform/x11/x11_window.cc:2445:32 in ui::X11Window::OnWindowMapped() Shadow bytes around the buggy address: 0x7bb58abe6b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa fa 0x7bb58abe6c00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x7bb58abe6c80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7bb58abe6d00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7bb58abe6d80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd =>0x7bb58abe6e00: fd fd fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd 0x7bb58abe6e80: fd fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa 0x7bb58abe6f00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x7bb58abe6f80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x7bb58abe7000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x7bb58abe7080: 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 ==971==ADDITIONAL INFO ==971==Note: Please include this section with the ASan report. Task trace: ==971==END OF ADDITIONAL INFO ==971==ABORTING [1/1] X11WindowOzoneTest.OnWindowMappedUseAfterFreeAfterMaximize (CRASHED) 1 test crashed: X11WindowOzoneTest.OnWindowMappedUseAfterFreeAfterMaximize (../../ui/ozone/platform/x11/x11_window_ozone_unittest.cc:388) Tests took 0 seconds.