New issue
Advanced search Search tips

Issue 855585 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Blocking:
issue 843511



Sign in to add a comment

views_mus_unittests MenuRunnerTest leak memory under lsan

Project Member Reported by thakis@chromium.org, Jun 22 2018

Issue description

I'm adding views_mus_unittests to the memory bots. The asan/lsan bot complains about reading uninitialized memory in MenuRunnerTest:

https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux_chromium_chromeos_asan_rel_ng/15672

MenuRunnerTest.NonLatinMnemonic
MenuRunnerTest.AsynchronousKeyEventHandling
MenuRunnerTest.LatinMnemonic

All 3 stacks look the same:

Indirect leak of 776 byte(s) in 1 object(s) allocated from:
    #0 0x586fd2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:93:3
    #1 0x3eb4a5c in views::MenuItemView::AddMenuItemAt(int, int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, gfx::VectorIcon const*, gfx::ImageSkia const&, views::MenuItemView::Type, ui::MenuSeparatorType) ui/views/controls/menu/menu_item_view.cc:263:24
    #2 0x3eb60cd in AppendMenuItemImpl ui/views/controls/menu/menu_item_view.cc:351:10
    #3 0x3eb60cd in views::MenuItemView::AppendMenuItem(int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, views::MenuItemView::Type) ui/views/controls/menu/menu_item_view.cc:299
    #4 0x933207 in views::test::MenuRunnerTest::SetUp() ui/views/controls/menu/menu_runner_unittest.cc:104:20
    #5 0x2836f42 in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc
    #6 0x2839074 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2667:11
    #7 0x283a446 in testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2785:28
    #8 0x285fb46 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5047:43
    #9 0x285ed95 in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc
    #10 0x2bb26da in RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2329:46
    #11 0x2bb26da in base::TestSuite::Run() base/test/test_suite.cc:275
    #12 0x2bb7afb in Run base/callback.h:96:12
    #13 0x2bb7afb in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225
    #14 0x2bb75bf in base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10
    #15 0x6c73f8 in views::ViewsTestSuite::RunTests() ui/views/views_test_suite.cc:33:10
    #16 0x5b0f74 in main ui/views/mus/run_all_unittests_mus.cc:8:47
    #17 0x7fbb2eef1f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
Indirect leak of 776 byte(s) in 1 object(s) allocated from:
    #0 0x586fd2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:93:3
    #1 0x3eb4a5c in views::MenuItemView::AddMenuItemAt(int, int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, gfx::VectorIcon const*, gfx::ImageSkia const&, views::MenuItemView::Type, ui::MenuSeparatorType) ui/views/controls/menu/menu_item_view.cc:263:24
    #2 0x3eb60cd in AppendMenuItemImpl ui/views/controls/menu/menu_item_view.cc:351:10
    #3 0x3eb60cd in views::MenuItemView::AppendMenuItem(int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, views::MenuItemView::Type) ui/views/controls/menu/menu_item_view.cc:299
    #4 0x93316f in views::test::MenuRunnerTest::SetUp() ui/views/controls/menu/menu_runner_unittest.cc:103:20
    #5 0x2836f42 in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc
    #6 0x2839074 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2667:11
    #7 0x283a446 in testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2785:28
    #8 0x285fb46 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5047:43
    #9 0x285ed95 in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc
    #10 0x2bb26da in RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2329:46
    #11 0x2bb26da in base::TestSuite::Run() base/test/test_suite.cc:275
    #12 0x2bb7afb in Run base/callback.h:96:12
    #13 0x2bb7afb in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225
    #14 0x2bb75bf in base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10
    #15 0x6c73f8 in views::ViewsTestSuite::RunTests() ui/views/views_test_suite.cc:33:10
    #16 0x5b0f74 in main ui/views/mus/run_all_unittests_mus.cc:8:47
    #17 0x7fbb2eef1f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
Indirect leak of 776 byte(s) in 1 object(s) allocated from:
    #0 0x586fd2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:93:3
    #1 0x9330ed in views::test::MenuRunnerTest::SetUp() ui/views/controls/menu/menu_runner_unittest.cc:102:21
    #2 0x2836f42 in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc
    #3 0x2839074 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2667:11
    #4 0x283a446 in testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2785:28
    #5 0x285fb46 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5047:43
    #6 0x285ed95 in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc
    #7 0x2bb26da in RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2329:46
    #8 0x2bb26da in base::TestSuite::Run() base/test/test_suite.cc:275
    #9 0x2bb7afb in Run base/callback.h:96:12
    #10 0x2bb7afb in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225
    #11 0x2bb75bf in base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10
    #12 0x6c73f8 in views::ViewsTestSuite::RunTests() ui/views/views_test_suite.cc:33:10
    #13 0x5b0f74 in main ui/views/mus/run_all_unittests_mus.cc:8:47
    #14 0x7fbb2eef1f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
Indirect leak of 632 byte(s) in 1 object(s) allocated from:
    #0 0x586fd2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:93:3
    #1 0x3eb6568 in views::MenuItemView::CreateSubmenu() ui/views/controls/menu/menu_item_view.cc:357:16
    #2 0x3eb478a in views::MenuItemView::AddMenuItemAt(int, int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, gfx::VectorIcon const*, gfx::ImageSkia const&, views::MenuItemView::Type, ui::MenuSeparatorType) ui/views/controls/menu/menu_item_view.cc:257:5
    #3 0x3eb60cd in AppendMenuItemImpl ui/views/controls/menu/menu_item_view.cc:351:10
    #4 0x3eb60cd in views::MenuItemView::AppendMenuItem(int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, views::MenuItemView::Type) ui/views/controls/menu/menu_item_view.cc:299
    #5 0x93316f in views::test::MenuRunnerTest::SetUp() ui/views/controls/menu/menu_runner_unittest.cc:103:20
    #6 0x2836f42 in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc
    #7 0x2839074 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2667:11
    #8 0x283a446 in testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2785:28
    #9 0x285fb46 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5047:43
    #10 0x285ed95 in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc
    #11 0x2bb26da in RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2329:46
    #12 0x2bb26da in base::TestSuite::Run() base/test/test_suite.cc:275
    #13 0x2bb7afb in Run base/callback.h:96:12
    #14 0x2bb7afb in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225
    #15 0x2bb75bf in base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10
    #16 0x6c73f8 in views::ViewsTestSuite::RunTests() ui/views/views_test_suite.cc:33:10
    #17 0x5b0f74 in main ui/views/mus/run_all_unittests_mus.cc:8:47
    #18 0x7fbb2eef1f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
Indirect leak of 568 byte(s) in 1 object(s) allocated from:
    #0 0x586fd2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:93:3
    #1 0x3eb6591 in views::MenuItemView::CreateSubmenu() ui/views/controls/menu/menu_item_view.cc:360:33
    #2 0x3eb478a in views::MenuItemView::AddMenuItemAt(int, int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, gfx::VectorIcon const*, gfx::ImageSkia const&, views::MenuItemView::Type, ui::MenuSeparatorType) ui/views/controls/menu/menu_item_view.cc:257:5
    #3 0x3eb60cd in AppendMenuItemImpl ui/views/controls/menu/menu_item_view.cc:351:10
    #4 0x3eb60cd in views::MenuItemView::AppendMenuItem(int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, views::MenuItemView::Type) ui/views/controls/menu/menu_item_view.cc:299
    #5 0x93316f in views::test::MenuRunnerTest::SetUp() ui/views/controls/menu/menu_runner_unittest.cc:103:20
    #6 0x2836f42 in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc
    #7 0x2839074 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2667:11
    #8 0x283a446 in testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2785:28
    #9 0x285fb46 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5047:43
    #10 0x285ed95 in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc
    #11 0x2bb26da in RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2329:46
    #12 0x2bb26da in base::TestSuite::Run() base/test/test_suite.cc:275
    #13 0x2bb7afb in Run base/callback.h:96:12
    #14 0x2bb7afb in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225
    #15 0x2bb75bf in base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10
    #16 0x6c73f8 in views::ViewsTestSuite::RunTests() ui/views/views_test_suite.cc:33:10
    #17 0x5b0f74 in main ui/views/mus/run_all_unittests_mus.cc:8:47
    #18 0x7fbb2eef1f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
Indirect leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x586fd2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:93:3
    #1 0x3ecd1dd in views::SubmenuView::SubmenuView(views::MenuItemView*) ui/views/controls/menu/submenu_view.cc:48:24
    #2 0x3eb6576 in views::MenuItemView::CreateSubmenu() ui/views/controls/menu/menu_item_view.cc:357:20
    #3 0x3eb478a in views::MenuItemView::AddMenuItemAt(int, int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, gfx::VectorIcon const*, gfx::ImageSkia const&, views::MenuItemView::Type, ui::MenuSeparatorType) ui/views/controls/menu/menu_item_view.cc:257:5
    #4 0x3eb60cd in AppendMenuItemImpl ui/views/controls/menu/menu_item_view.cc:351:10
    #5 0x3eb60cd in views::MenuItemView::AppendMenuItem(int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, views::MenuItemView::Type) ui/views/controls/menu/menu_item_view.cc:299
    #6 0x93316f in views::test::MenuRunnerTest::SetUp() ui/views/controls/menu/menu_runner_unittest.cc:103:20
    #7 0x2836f42 in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc
    #8 0x2839074 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2667:11
    #9 0x283a446 in testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2785:28
    #10 0x285fb46 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5047:43
    #11 0x285ed95 in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc
    #12 0x2bb26da in RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2329:46
    #13 0x2bb26da in base::TestSuite::Run() base/test/test_suite.cc:275
    #14 0x2bb7afb in Run base/callback.h:96:12
    #15 0x2bb7afb in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225
    #16 0x2bb75bf in base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10
    #17 0x6c73f8 in views::ViewsTestSuite::RunTests() ui/views/views_test_suite.cc:33:10
    #18 0x5b0f74 in main ui/views/mus/run_all_unittests_mus.cc:8:47
    #19 0x7fbb2eef1f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
Indirect leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x586fd2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:93:3
    #1 0x3f9d418 in __libcpp_allocate buildtools/third_party/libc++/trunk/include/new:259:10
    #2 0x3f9d418 in allocate buildtools/third_party/libc++/trunk/include/memory:1799
    #3 0x3f9d418 in allocate buildtools/third_party/libc++/trunk/include/memory:1548
    #4 0x3f9d418 in __split_buffer buildtools/third_party/libc++/trunk/include/__split_buffer:311
    #5 0x3f9d418 in std::__1::vector<views::View*, std::__1::allocator<views::View*> >::insert(std::__1::__wrap_iter<views::View* const*>, views::View* const&) buildtools/third_party/libc++/trunk/include/vector:1759
    #6 0x3f9a7a5 in views::View::AddChildViewAt(views::View*, int) ui/views/view.cc:213:13
    #7 0x3eb5171 in views::MenuItemView::AddMenuItemAt(int, int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, gfx::VectorIcon const*, gfx::ImageSkia const&, views::MenuItemView::Type, ui::MenuSeparatorType) ui/views/controls/menu/menu_item_view.cc:277:13
    #8 0x3eb60cd in AppendMenuItemImpl ui/views/controls/menu/menu_item_view.cc:351:10
    #9 0x3eb60cd in views::MenuItemView::AppendMenuItem(int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, views::MenuItemView::Type) ui/views/controls/menu/menu_item_view.cc:299
    #10 0x933207 in views::test::MenuRunnerTest::SetUp() ui/views/controls/menu/menu_runner_unittest.cc:104:20
    #11 0x2836f42 in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc
    #12 0x2839074 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2667:11
    #13 0x283a446 in testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2785:28
    #14 0x285fb46 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5047:43
    #15 0x285ed95 in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc
    #16 0x2bb26da in RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2329:46
    #17 0x2bb26da in base::TestSuite::Run() base/test/test_suite.cc:275
    #18 0x2bb7afb in Run base/callback.h:96:12
    #19 0x2bb7afb in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225
    #20 0x2bb75bf in base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10
    #21 0x6c73f8 in views::ViewsTestSuite::RunTests() ui/views/views_test_suite.cc:33:10
    #22 0x5b0f74 in main ui/views/mus/run_all_unittests_mus.cc:8:47
    #23 0x7fbb2eef1f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
Indirect leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x586fd2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:93:3
    #1 0x3f9d418 in __libcpp_allocate buildtools/third_party/libc++/trunk/include/new:259:10
    #2 0x3f9d418 in allocate buildtools/third_party/libc++/trunk/include/memory:1799
    #3 0x3f9d418 in allocate buildtools/third_party/libc++/trunk/include/memory:1548
    #4 0x3f9d418 in __split_buffer buildtools/third_party/libc++/trunk/include/__split_buffer:311
    #5 0x3f9d418 in std::__1::vector<views::View*, std::__1::allocator<views::View*> >::insert(std::__1::__wrap_iter<views::View* const*>, views::View* const&) buildtools/third_party/libc++/trunk/include/vector:1759
    #6 0x3f9a7a5 in views::View::AddChildViewAt(views::View*, int) ui/views/view.cc:213:13
    #7 0x3eb65c7 in views::MenuItemView::CreateSubmenu() ui/views/controls/menu/menu_item_view.cc:361:5
    #8 0x3eb478a in views::MenuItemView::AddMenuItemAt(int, int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, gfx::VectorIcon const*, gfx::ImageSkia const&, views::MenuItemView::Type, ui::MenuSeparatorType) ui/views/controls/menu/menu_item_view.cc:257:5
    #9 0x3eb60cd in AppendMenuItemImpl ui/views/controls/menu/menu_item_view.cc:351:10
    #10 0x3eb60cd in views::MenuItemView::AppendMenuItem(int, std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > const&, views::MenuItemView::Type) ui/views/controls/menu/menu_item_view.cc:299
    #11 0x93316f in views::test::MenuRunnerTest::SetUp() ui/views/controls/menu/menu_runner_unittest.cc:103:20
    #12 0x2836f42 in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc
    #13 0x2839074 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2667:11
    #14 0x283a446 in testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2785:28
    #15 0x285fb46 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5047:43
    #16 0x285ed95 in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc
    #17 0x2bb26da in RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2329:46
    #18 0x2bb26da in base::TestSuite::Run() base/test/test_suite.cc:275
    #19 0x2bb7afb in Run base/callback.h:96:12
    #20 0x2bb7afb in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225
    #21 0x2bb75bf in base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10
    #22 0x6c73f8 in views::ViewsTestSuite::RunTests() ui/views/views_test_suite.cc:33:10
    #23 0x5b0f74 in main ui/views/mus/run_all_unittests_mus.cc:8:47
    #24 0x7fbb2eef1f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 22 2018

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

commit 65338c09a5e9cbf8eae281d52eefc14182e58a8a
Author: Nico Weber <thakis@chromium.org>
Date: Fri Jun 22 19:13:40 2018

Enable more tests on the cros memory bots.

The motivation is to remove chromium_memory_chromiumos_asan_gtests in favor
of linux_chromeos_rel_gtests, but when I tried doing that directly [1], I got
many asan/lsan and msan reports for these tests. Some of them pass however,
so I'd like to lock in the working ones while I work on fixing the broken ones.

1: https://chromium-review.googlesource.com/c/chromium/src/+/1110703

Adds to "Linux ChromiumOS MSan Tests" and "Linux Chromium OS ASan LSan Tests (1)" these tests:
- chromevox_tests
- gl_unittests_ozone (to asan/lsan only)
- ozone_gl_unittests
- ozone_x11_unittests
- select_to_speak_extension_tests
- views_mus_interactive_ui_tests

Bug: 843511
Bug:  855573 , 855580 , 855588 
Bug:  855584 , 855585 , 855583 
Change-Id: I9402cd43d1d0ef95432eba8231ae79c936b4848b
Reviewed-on: https://chromium-review.googlesource.com/1112037
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569725}
[modify] https://crrev.com/65338c09a5e9cbf8eae281d52eefc14182e58a8a/testing/buildbot/chromium.memory.json
[modify] https://crrev.com/65338c09a5e9cbf8eae281d52eefc14182e58a8a/testing/buildbot/test_suite_exceptions.pyl
[modify] https://crrev.com/65338c09a5e9cbf8eae281d52eefc14182e58a8a/testing/buildbot/test_suites.pyl

Comment 2 by thakis@chromium.org, Jun 22 2018

The problem is that menu_item_view_ is created in MenuRunnerTest::SetUp(), but it's a bare pointer with a comment saying

  // Owned by MenuRunner.
  MenuItemView* menu_item_view_;

-- but the runner is only created in MenuRunnerTest::InitMenuRunner(), and the 3 leaking tests start out like so:

TEST_F(MenuRunnerTest, AsynchronousKeyEventHandling) {
  // TODO: test uses GetContext(), which is not applicable to aura-mus.
  // http://crbug.com/663809.
  if (IsMus())
    return;

  InitMenuRunner(0);


They early out before calling the function assuming ownership of menu_item_view_.

Comment 3 by thakis@chromium.org, Jun 22 2018

Cc: jonr...@chromium.org
Owner: thakis@chromium.org
Status: Started (was: Untriaged)
I'll make a CL.
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 23 2018

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

commit a2a95f5989f13a8636993bd8065b02529ce10d48
Author: jonross <jonross@chromium.org>
Date: Sat Jun 23 15:33:51 2018

Fix leaks in MenuRunnerTest that happen if a test early-exits before InitMenuRunner is called.

Bug:  855585 
Change-Id: Id4bc8041f88a788aeafa6946d4bb1b0633e1e90b
Reviewed-on: https://chromium-review.googlesource.com/1112560
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569876}
[modify] https://crrev.com/a2a95f5989f13a8636993bd8065b02529ce10d48/ui/views/controls/menu/menu_runner_unittest.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Jun 25 2018

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

commit 5ecf35f1ab2a0a4e2fda04595383231c251f8a9e
Author: Nico Weber <thakis@chromium.org>
Date: Mon Jun 25 01:50:22 2018

Enable more tests on the cros memory bots.

Enable views_mus_unittests on both lsan/asan and on msan, it should pass now.

Enable ozone_unittests and wayland_client_perftests on just msan
(they don't pass on lsan/asan yet).

With this, linux_chromeos_rel_specific_gtests_asan_bringup is identical to
linux_chromeos_rel_specific_gtests and can be removed, and because of _that_,
chromium_memory_chromiumos_asan_gtests is identical to linux_chromeos_rel_gtests
and can also be removed.

As a consequence, tests added to the cros rel bots will be added to the
memory bots automatically going forward.

TBR=kbr

Bug: 843511
Bug:  855580 , 855588 , 855584 , 855585 , 855583 
Change-Id: I6a28ebae4c9005ce508f8caef07679a1bb50285c
Reviewed-on: https://chromium-review.googlesource.com/1112957
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569949}
[modify] https://crrev.com/5ecf35f1ab2a0a4e2fda04595383231c251f8a9e/testing/buildbot/chromium.memory.json
[modify] https://crrev.com/5ecf35f1ab2a0a4e2fda04595383231c251f8a9e/testing/buildbot/test_suite_exceptions.pyl
[modify] https://crrev.com/5ecf35f1ab2a0a4e2fda04595383231c251f8a9e/testing/buildbot/test_suites.pyl
[modify] https://crrev.com/5ecf35f1ab2a0a4e2fda04595383231c251f8a9e/testing/buildbot/waterfalls.pyl

Comment 6 by thakis@chromium.org, Jun 25 2018

Status: StartedF (was: Started)

Comment 7 by thakis@chromium.org, Jun 25 2018

Status: Fixed (was: StartedF)

Sign in to add a comment