New issue
Advanced search Search tips

Issue 861635 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jul 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

NGInlineItemsBuilderTest failed in asan disabling DCHECK

Project Member Reported by tikuta@chromium.org, Jul 9

Issue description

https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux_chromium_asan_rel_ng/50550

Seems there is leaks around blink::LayoutText::CreateEmptyAnonymous when disabling DCHECK

[ RUN      ] NGInlineItemsBuilderTest.CollapseTrailingSpaces
[       OK ] NGInlineItemsBuilderTest.CollapseTrailingSpaces (17 ms)
[----------] 1 test from NGInlineItemsBuilderTest (17 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (18 ms total)
[  PASSED  ] 1 test.
=================================================================
==15709==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 320 byte(s) in 2 object(s) allocated from:
    #0 0x40c8e23 in __interceptor_malloc /b/swarming/w/ir/kitchen-workdir/src/third_party/llvm/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x14e030b4 in Alloc base/allocator/partition_allocator/partition_alloc.h:263:18
    #2 0x14e030b4 in blink::LayoutObject::operator new(unsigned long) third_party/blink/renderer/core/layout/layout_object.cc:195
    #3 0x14f0b996 in blink::LayoutText::CreateEmptyAnonymous(blink::Document&) third_party/blink/renderer/core/layout/layout_text.cc:143:22
    #4 0xc2ad8ac in blink::(anonymous namespace)::NGInlineItemsBuilderTest::TestAppend(WTF::Vector<blink::(anonymous namespace)::NGInlineItemsBuilderTest::Input, 0ul, WTF::PartitionAllocator>) third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder_test.cc:74:29
    #5 0xc2c19e3 in blink::(anonymous namespace)::NGInlineItemsBuilderTest::TestAppend(blink::(anonymous namespace)::NGInlineItemsBuilderTest::Input const&, blink::(anonymous namespace)::NGInlineItemsBuilderTest::Input const&) third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder_test.cc:89:12
    #6 0xc2c5b14 in TestAppend third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder_test.cc:92:12
    #7 0xc2c5b14 in blink::(anonymous namespace)::NGInlineItemsBuilderTest_CollapseTrailingSpaces_Test::TestBody() third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder_test.cc:227
    #8 0x7ed65f2 in testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc
    #9 0x7ed86d4 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2667:11
    #10 0x7ed9ae6 in testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2785:28
    #11 0x7eff816 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5047:43
    #12 0x7efea42 in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc
    #13 0x1702e037 in RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2329:46
    #14 0x1702e037 in base::TestSuite::Run() base/test/test_suite.cc:277
    #15 0x40fd112 in (anonymous namespace)::runHelper(base::TestSuite*) third_party/blink/renderer/controller/tests/run_all_tests.cc:48:27
    #16 0x1703427f in Run base/callback.h:99:12
    #17 0x1703427f in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225
    #18 0x17033e39 in base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10
    #19 0x40fcf48 in main third_party/blink/renderer/controller/tests/run_all_tests.cc:69:10
    #20 0x7f44bc8eff44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
 
Labels: -Pri-3 Pri-2
Cc: xiaoche...@chromium.org
Owner: kojii@chromium.org
Koji-san, can I ask you to take a look or assigin this to appropriate person?
This leak happens when I tried to disable dcheck on asan builder.

The build used following args.gn
```
goma_dir = "/b/swarming/w/ir/cache/goma/client"
is_asan = true
is_component_build = false
is_debug = false
is_lsan = true
strip_absolute_paths_from_debug_symbols = true
use_goma = true
```
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 10

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

commit f79a4a76019a904629f3a4b519ceec4dad525174
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Jul 10 07:27:09 2018

[LayoutNG] Let NGInlineItemsBuilderTest::TestAppend delete anonymous LayoutText

This patch deletes anonymous LayoutText created in
NGInlineItemsBuilderTest::TestAppend.

Note, the leak was not reproducible for me, but I think this
can fix the leak.

Bug:  861635 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Iad66acb84bc9c2c692666be1ff93b8c470c2b371
Reviewed-on: https://chromium-review.googlesource.com/1130973
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573642}
[modify] https://crrev.com/f79a4a76019a904629f3a4b519ceec4dad525174/third_party/blink/renderer/core/layout/ng/inline/ng_inline_items_builder_test.cc

Status: Verified (was: Untriaged)
webkit_unit_tests passed in the try. Thank you again.

Sign in to add a comment