New issue
Advanced search Search tips

Issue 804853 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

BackgroundHTMLParser leaks strings in MemoryTracingBrowserTest on Lsan

Project Member Reported by ellyjo...@chromium.org, Jan 23 2018

Issue description

This test fails sometimes on LSan bots, and it seems that it detects some real leaks:

ERROR: LeakSanitizer: detected memory leaks
Direct leak of 258975 byte(s) in 22 object(s) allocated from:
    #0 0x97d653 in __interceptor_malloc /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_malloc_linux.cc:88:3
    #1 0x19be0bc8 in PartitionAllocGenericFlags base/allocator/partition_allocator/partition_alloc.h:946:18
    #2 0x19be0bc8 in Alloc base/allocator/partition_allocator/partition_alloc.h:966
    #3 0x19be0bc8 in BufferMalloc third_party/WebKit/Source/platform/wtf/allocator/Partitions.h:109
    #4 0x19be0bc8 in WTF::StringImpl::CreateUninitialized(unsigned int, unsigned char*&) third_party/WebKit/Source/platform/wtf/text/StringImpl.cpp:118
    #5 0x19c39227 in CreateUninitialized third_party/WebKit/Source/platform/wtf/text/WTFString.h:345:12
    #6 0x19c39227 in WTF::String::Make8BitFrom16BitSource(unsigned short const*, unsigned long) third_party/WebKit/Source/platform/wtf/text/WTFString.cpp:713
    #7 0x1c177108 in blink::AttemptStaticStringCreation(unsigned short const*, unsigned long, blink::CharacterWidth) third_party/WebKit/Source/core/html/parser/HTMLParserIdioms.cpp:459:14
    #8 0x1c2efd49 in blink::CompactHTMLToken::CompactHTMLToken(blink::HTMLToken const*, WTF::TextPosition const&) third_party/WebKit/Source/core/html/parser/HTMLParserIdioms.h:132:10
    #9 0x1c2e19bb in blink::BackgroundHTMLParser::PumpTokenizer() third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp:257:24
    #10 0x1c2e0e8a in blink::BackgroundHTMLParser::UpdateDocument(WTF::String const&) third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp:148:3
    #11 0x1c2e0a93 in blink::BackgroundHTMLParser::AppendRawBytesFromMainThread(std::__1::unique_ptr<WTF::Vector<char, 0ul, WTF::PartitionAllocator>, std::__1::default_delete<WTF::Vector<char, 0ul, WTF::PartitionAllocator> > >) third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp:142:3
    #12 0x1c170eb5 in void base::internal::FunctorTraits<void (blink::BackgroundHTMLParser::*)(std::__1::unique_ptr<WTF::Vector<char, 0ul, WTF::PartitionAllocator>, std::__1::default_delete<WTF::Vector<char, 0ul, WTF::PartitionAllocator> > >), void>::Invoke<base::WeakPtr<blink::BackgroundHTMLParser>, std::__1::unique_ptr<WTF::Vector<char, 0ul, WTF::PartitionAllocator>, std::__1::default_delete<WTF::Vector<char, 0ul, WTF::PartitionAllocator> > > >(void (blink::BackgroundHTMLParser::*)(std::__1::unique_ptr<WTF::Vector<char, 0ul, WTF::PartitionAllocator>, std::__1::default_delete<WTF::Vector<char, 0ul, WTF::PartitionAllocator> > >), base::WeakPtr<blink::BackgroundHTMLParser>&&, std::__1::unique_ptr<WTF::Vector<char, 0ul, WTF::PartitionAllocator>, std::__1::default_delete<WTF::Vector<char, 0ul, WTF::PartitionAllocator> > >&&) base/bind_internal.h:211:12
    #13 0x1c170952 in MakeItSo<void (blink::BackgroundHTMLParser::*)(std::__1::unique_ptr<WTF::Vector<char, 0, WTF::PartitionAllocator>, std::__1::default_delete<WTF::Vector<char, 0, WTF::PartitionAllocator> > >), base::WeakPtr<blink::BackgroundHTMLParser>, std::__1::unique_ptr<WTF::Vector<char, 0, WTF::PartitionAllocator>, std::__1::default_delete<WTF::Vector<char, 0, WTF::PartitionAllocator> > > > base/bind_internal.h:314:5
    #14 0x1c170952 in void base::internal::Invoker<base::internal::BindState<void (blink::BackgroundHTMLParser::*)(std::__1::unique_ptr<WTF::Vector<char, 0ul, WTF::PartitionAllocator>, std::__1::default_delete<WTF::Vector<char, 0ul, WTF::PartitionAllocator> > >), base::WeakPtr<blink::BackgroundHTMLParser>, WTF::PassedWrapper<std::__1::unique_ptr<WTF::Vector<char, 0ul, WTF::PartitionAllocator>, std::__1::default_delete<WTF::Vector<char, 0ul, WTF::PartitionAllocator> > > > >, void ()>::RunImpl<void (blink::BackgroundHTMLParser::*)(std::__1::unique_ptr<WTF::Vector<char, 0ul, WTF::PartitionAllocator>, std::__1::default_delete<WTF::Vector<char, 0ul, WTF::PartitionAllocator> > >), std::__1::tuple<base::WeakPtr<blink::BackgroundHTMLParser>, WTF::PassedWrapper<std::__1::unique_ptr<WTF::Vector<char, 0ul, WTF::PartitionAllocator>, std::__1::default_delete<WTF::Vector<char, 0ul, WTF::PartitionAllocator> > > > >, 0ul, 1ul>(void (blink::BackgroundHTMLParser::*&&)(std::__1::unique_ptr<WTF::Vector<char, 0ul, WTF::PartitionAllocator>, std::__1::default_delete<WTF::Vector<char, 0ul, WTF::PartitionAllocator> > >), std::__1::tuple<base::WeakPtr<blink::BackgroundHTMLParser>, WTF::PassedWrapper<std::__1::unique_ptr<WTF::Vector<char, 0ul, WTF::PartitionAllocator>, std::__1::default_delete<WTF::Vector<char, 0ul, WTF::PartitionAllocator> > > > >&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>) base/bind_internal.h:368
    #15 0xd309cf0 in Run base/callback.h:65:12
    #16 0xd309cf0 in RunInternal third_party/WebKit/Source/platform/wtf/Functional.h:258
    #17 0xd309cf0 in WTF::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::Run() third_party/WebKit/Source/platform/wtf/Functional.h:245
    #18 0xdc8b6f2 in Run base/callback.h:65:12
    #19 0xdc8b6f2 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55
    #20 0xd430ded in blink::scheduler::TaskQueueManager::ProcessTaskFromWorkQueue(blink::scheduler::internal::WorkQueue*, blink::scheduler::LazyNow, base::TimeTicks*) third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc:543:21
    #21 0xd42efc6 in blink::scheduler::TaskQueueManager::DoWork(blink::scheduler::internal::Sequence::WorkType) third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc:343:13
    #22 0xd44011e in Invoke<const base::WeakPtr<blink::scheduler::TaskQueueManager> &, const blink::scheduler::internal::Sequence::WorkType &> base/bind_internal.h:211:12
    #23 0xd44011e in MakeItSo<void (blink::scheduler::TaskQueueManager::*const &)(blink::scheduler::internal::Sequence::WorkType), const base::WeakPtr<blink::scheduler::TaskQueueManager> &, const blink::scheduler::internal::Sequence::WorkType &> base/bind_internal.h:314
    #24 0xd44011e in RunImpl<void (blink::scheduler::TaskQueueManager::*const &)(blink::scheduler::internal::Sequence::WorkType), const std::__1::tuple<base::WeakPtr<blink::scheduler::TaskQueueManager>, blink::scheduler::internal::Sequence::WorkType> &, 0, 1> base/bind_internal.h:368
    #25 0xd44011e in base::internal::Invoker<base::internal::BindState<void (blink::scheduler::TaskQueueManager::*)(blink::scheduler::internal::Sequence::WorkType), base::WeakPtr<blink::scheduler::TaskQueueManager>, blink::scheduler::internal::Sequence::WorkType>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:350
    #26 0xdc8b6f2 in Run base/callback.h:65:12
    #27 0xdc8b6f2 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55
    #28 0xd445dc6 in blink::scheduler::internal::ThreadControllerImpl::DoWork(blink::scheduler::internal::Sequence::WorkType) third_party/WebKit/Source/platform/scheduler/base/thread_controller_impl.cc:99:19
    #29 0xd44827e in Invoke<const base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> &, const blink::scheduler::internal::Sequence::WorkType &> base/bind_internal.h:211:12
    #30 0xd44827e in MakeItSo<void (blink::scheduler::internal::ThreadControllerImpl::*const &)(blink::scheduler::internal::Sequence::WorkType), const base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> &, const blink::scheduler::internal::Sequence::WorkType &> base/bind_internal.h:314
    #31 0xd44827e in RunImpl<void (blink::scheduler::internal::ThreadControllerImpl::*const &)(blink::scheduler::internal::Sequence::WorkType), const std::__1::tuple<base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::Sequence::WorkType> &, 0, 1> base/bind_internal.h:368
    #32 0xd44827e in base::internal::Invoker<base::internal::BindState<void (blink::scheduler::internal::ThreadControllerImpl::*)(blink::scheduler::internal::Sequence::WorkType), base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::Sequence::WorkType>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:350
    #33 0xdc8b6f2 in Run base/callback.h:65:12
    #34 0xdc8b6f2 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55
    #35 0xdf16f50 in base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:124:19
    #36 0xdd04b0c in base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:399:25
    #37 0xdd056d8 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:411:5
    #38 0xdd06030 in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:455:16
    #39 0xdd0ad82 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:37:31
    #40 0xdd034d7 in base::MessageLoop::Run(bool) base/message_loop/message_loop.cc:350:12
    #41 0xdda283d in base::RunLoop::Run() base/run_loop.cc:130:14
    #42 0x1f9ccf5d in content::RendererMain(content::MainFunctionParams const&) content/renderer/renderer_main.cc:218:23
    #43 0xd9c98cd in content::RunZygote(content::MainFunctionParams const&, content::ContentMainDelegate*) content/app/content_main_runner.cc:350:14
    #44 0xd9cae53 in content::RunNamedProcessTypeMain(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, content::MainFunctionParams const&, content::ContentMainDelegate*) content/app/content_main_runner.cc:430:12
    #45 0xd9cdd73 in content::ContentMainRunnerImpl::Run() content/app/content_main_runner.cc:712:12
Direct leak of 6880 byte(s) in 307 object(s) allocated from:
    #0 0x97d653 in __interceptor_malloc /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_malloc_linux.cc:88:3
    #1 0x19ba2350 in PartitionAllocGenericFlags base/allocator/partition_allocator/partition_alloc.h:946:18
    #2 0x19ba2350 in Alloc base/allocator/partition_allocator/partition_alloc.h:966
    #3 0x19ba2350 in BufferMalloc third_party/WebKit/Source/platform/wtf/allocator/Partitions.h:109
    #4 0x19ba2350 in WTF::PartitionAllocator::AllocateBacking(unsigned long, char const*) third_party/WebKit/Source/platform/wtf/allocator/PartitionAllocator.cpp:13
    #5 0x1b58b649 in AllocateVectorBacking<blink::Attribute> third_party/WebKit/Source/platform/wtf/allocator/PartitionAllocator.h:43:9
    #6 0x1b58b649 in WTF::VectorBufferBase<blink::Attribute, false, WTF::PartitionAllocator>::AllocateBuffer(unsigned long) third_party/WebKit/Source/platform/wtf/Vector.h:401
    #7 0x1c2a4c98 in VectorBuffer third_party/WebKit/Source/platform/wtf/Vector.h:496:7
    #8 0x1c2a4c98 in WTF::Vector<blink::Attribute, 0ul, WTF::PartitionAllocator>::Vector(WTF::Vector<blink::Attribute, 0ul, WTF::PartitionAllocator> const&) third_party/WebKit/Source/platform/wtf/Vector.h:1397
    #9 0x1c30a820 in blink::HTMLStackItem::HTMLStackItem(blink::ContainerNode*, blink::AtomicHTMLToken*, WTF::AtomicString const&) third_party/WebKit/Source/core/html/parser/HTMLStackItem.h:204:9
    #10 0x1c304fd4 in Create third_party/WebKit/Source/core/html/parser/HTMLStackItem.h:54:16
    #11 0x1c304fd4 in blink::HTMLConstructionSite::InsertHTMLElement(blink::AtomicHTMLToken*) third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp:695
    #12 0x1c26c9ea in blink::HTMLTreeBuilder::ProcessStartTagForInBody(blink::AtomicHTMLToken*) third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
    #13 0x1c253f80 in blink::HTMLTreeBuilder::ProcessStartTag(blink::AtomicHTMLToken*) third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
    #14 0x1c244d63 in blink::HTMLTreeBuilder::ProcessToken(blink::AtomicHTMLToken*) third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp:356:7
    #15 0x1c23ccec in blink::HTMLTreeBuilder::ConstructTree(blink::AtomicHTMLToken*) third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp:313:5
    #16 0x1c14d22d in ConstructTreeFromCompactHTMLToken third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:747:18
    #17 0x1c14d22d in blink::HTMLDocumentParser::ProcessTokenizedChunkFromBackgroundParser(std::__1::unique_ptr<blink::HTMLDocumentParser::TokenizedChunk, std::__1::default_delete<blink::HTMLDocumentParser::TokenizedChunk> >) third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:534
    #18 0x1c14591a in blink::HTMLDocumentParser::PumpPendingSpeculations() third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:608:9
    #19 0x1c144b05 in blink::HTMLDocumentParser::ResumeParsingAfterYield() third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:274:3
    #20 0xd309cf0 in Run base/callback.h:65:12
    #21 0xd309cf0 in RunInternal third_party/WebKit/Source/platform/wtf/Functional.h:258
    #22 0xd309cf0 in WTF::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::Run() third_party/WebKit/Source/platform/wtf/Functional.h:245
    #23 0x1a66c9ba in Run base/callback.h:65:12
    #24 0x1a66c9ba in blink::TaskHandle::Runner::Run(blink::TaskHandle const&) third_party/WebKit/Source/platform/WebTaskRunner.cpp:75
    #25 0x1a66db69 in Invoke<base::WeakPtr<blink::TaskHandle::Runner>, blink::TaskHandle> base/bind_internal.h:211:12
    #26 0x1a66db69 in MakeItSo<void (blink::TaskHandle::Runner::*)(const blink::TaskHandle &), base::WeakPtr<blink::TaskHandle::Runner>, blink::TaskHandle> base/bind_internal.h:314
    #27 0x1a66db69 in RunImpl<void (blink::TaskHandle::Runner::*)(const blink::TaskHandle &), std::__1::tuple<base::WeakPtr<blink::TaskHandle::Runner>, blink::TaskHandle>, 0, 1> base/bind_internal.h:368
    #28 0x1a66db69 in base::internal::Invoker<base::internal::BindState<void (blink::TaskHandle::Runner::*)(blink::TaskHandle const&), base::WeakPtr<blink::TaskHandle::Runner>, blink::TaskHandle>, void ()>::RunOnce(base::internal::BindStateBase*) base/bind_internal.h:336
    #29 0xd309cf0 in Run base/callback.h:65:12
    #30 0xd309cf0 in RunInternal third_party/WebKit/Source/platform/wtf/Functional.h:258
    #31 0xd309cf0 in WTF::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::Run() third_party/WebKit/Source/platform/wtf/Functional.h:245
    #32 0xdc8b6f2 in Run base/callback.h:65:12
    #33 0xdc8b6f2 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55
    #34 0xd430ded in blink::scheduler::TaskQueueManager::ProcessTaskFromWorkQueue(blink::scheduler::internal::WorkQueue*, blink::scheduler::LazyNow, base::TimeTicks*) third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc:543:21
    #35 0xd42efc6 in blink::scheduler::TaskQueueManager::DoWork(blink::scheduler::internal::Sequence::WorkType) third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc:343:13
    #36 0xd44011e in Invoke<const base::WeakPtr<blink::scheduler::TaskQueueManager> &, const blink::scheduler::internal::Sequence::WorkType &> base/bind_internal.h:211:12
    #37 0xd44011e in MakeItSo<void (blink::scheduler::TaskQueueManager::*const &)(blink::scheduler::internal::Sequence::WorkType), const base::WeakPtr<blink::scheduler::TaskQueueManager> &, const blink::scheduler::internal::Sequence::WorkType &> base/bind_internal.h:314
    #38 0xd44011e in RunImpl<void (blink::scheduler::TaskQueueManager::*const &)(blink::scheduler::internal::Sequence::WorkType), const std::__1::tuple<base::WeakPtr<blink::scheduler::TaskQueueManager>, blink::scheduler::internal::Sequence::WorkType> &, 0, 1> base/bind_internal.h:368
    #39 0xd44011e in base::internal::Invoker<base::internal::BindState<void (blink::scheduler::TaskQueueManager::*)(blink::scheduler::internal::Sequence::WorkType), base::WeakPtr<blink::scheduler::TaskQueueManager>, blink::scheduler::internal::Sequence::WorkType>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:350
    #40 0xdc8b6f2 in Run base/callback.h:65:12
    #41 0xdc8b6f2 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55
    #42 0xd445dc6 in blink::scheduler::internal::ThreadControllerImpl::DoWork(blink::scheduler::internal::Sequence::WorkType) third_party/WebKit/Source/platform/scheduler/base/thread_controller_impl.cc:99:19
    #43 0xd44827e in Invoke<const base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> &, const blink::scheduler::internal::Sequence::WorkType &> base/bind_internal.h:211:12
    #44 0xd44827e in MakeItSo<void (blink::scheduler::internal::ThreadControllerImpl::*const &)(blink::scheduler::internal::Sequence::WorkType), const base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> &, const blink::scheduler::internal::Sequence::WorkType &> base/bind_internal.h:314
    #45 0xd44827e in RunImpl<void (blink::scheduler::internal::ThreadControllerImpl::*const &)(blink::scheduler::internal::Sequence::WorkType), const std::__1::tuple<base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::Sequence::WorkType> &, 0, 1> base/bind_internal.h:368
    #46 0xd44827e in base::internal::Invoker<base::internal::BindState<void (blink::scheduler::internal::ThreadControllerImpl::*)(blink::scheduler::internal::Sequence::WorkType), base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::Sequence::WorkType>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:350
    #47 0xdc8b6f2 in Run base/callback.h:65:12
    #48 0xdc8b6f2 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55
    #49 0xdf16f50 in base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:124:19
    #50 0xdd04b0c in base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:399:25
    #51 0xdd056d8 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:411:5
    #52 0xdd06030 in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:455:16
    #53 0xdd0ad82 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:37:31
Direct leak of 1056 byte(s) in 63 object(s) allocated from:
    #0 0x97d653 in __interceptor_malloc /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_malloc_linux.cc:88:3
    #1 0x19ba2350 in PartitionAllocGenericFlags base/allocator/partition_allocator/partition_alloc.h:946:18
    #2 0x19ba2350 in Alloc base/allocator/partition_allocator/partition_alloc.h:966
    #3 0x19ba2350 in BufferMalloc third_party/WebKit/Source/platform/wtf/allocator/Partitions.h:109
    #4 0x19ba2350 in WTF::PartitionAllocator::AllocateBacking(unsigned long, char const*) third_party/WebKit/Source/platform/wtf/allocator/PartitionAllocator.cpp:13
    #5 0x1b58b649 in AllocateVectorBacking<blink::Attribute> third_party/WebKit/Source/platform/wtf/allocator/PartitionAllocator.h:43:9
    #6 0x1b58b649 in WTF::VectorBufferBase<blink::Attribute, false, WTF::PartitionAllocator>::AllocateBuffer(unsigned long) third_party/WebKit/Source/platform/wtf/Vector.h:401
    #7 0x1c2a4c98 in VectorBuffer third_party/WebKit/Source/platform/wtf/Vector.h:496:7
    #8 0x1c2a4c98 in WTF::Vector<blink::Attribute, 0ul, WTF::PartitionAllocator>::Vector(WTF::Vector<blink::Attribute, 0ul, WTF::PartitionAllocator> const&) third_party/WebKit/Source/platform/wtf/Vector.h:1397
    #9 0x1c30a820 in blink::HTMLStackItem::HTMLStackItem(blink::ContainerNode*, blink::AtomicHTMLToken*, WTF::AtomicString const&) third_party/WebKit/Source/core/html/parser/HTMLStackItem.h:204:9
    #10 0x1c304fd4 in Create third_party/WebKit/Source/core/html/parser/HTMLStackItem.h:54:16
    #11 0x1c304fd4 in blink::HTMLConstructionSite::InsertHTMLElement(blink::AtomicHTMLToken*) third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp:695
    #12 0x1c3054cd in blink::HTMLConstructionSite::InsertFormattingElement(blink::AtomicHTMLToken*) third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp:713:3
    #13 0x1c273863 in blink::HTMLTreeBuilder::ProcessStartTagForInBody(blink::AtomicHTMLToken*) third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
    #14 0x1c253f80 in blink::HTMLTreeBuilder::ProcessStartTag(blink::AtomicHTMLToken*) third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
    #15 0x1c244d63 in blink::HTMLTreeBuilder::ProcessToken(blink::AtomicHTMLToken*) third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp:356:7
    #16 0x1c23ccec in blink::HTMLTreeBuilder::ConstructTree(blink::AtomicHTMLToken*) third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp:313:5
    #17 0x1c14d22d in ConstructTreeFromCompactHTMLToken third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:747:18
    #18 0x1c14d22d in blink::HTMLDocumentParser::ProcessTokenizedChunkFromBackgroundParser(std::__1::unique_ptr<blink::HTMLDocumentParser::TokenizedChunk, std::__1::default_delete<blink::HTMLDocumentParser::TokenizedChunk> >) third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:534
    #19 0x1c14591a in blink::HTMLDocumentParser::PumpPendingSpeculations() third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:608:9
    #20 0x1c144b05 in blink::HTMLDocumentParser::ResumeParsingAfterYield() third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:274:3
    #21 0xd309cf0 in Run base/callback.h:65:12
    #22 0xd309cf0 in RunInternal third_party/WebKit/Source/platform/wtf/Functional.h:258
    #23 0xd309cf0 in WTF::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::Run() third_party/WebKit/Source/platform/wtf/Functional.h:245
    #24 0x1a66c9ba in Run base/callback.h:65:12
    #25 0x1a66c9ba in blink::TaskHandle::Runner::Run(blink::TaskHandle const&) third_party/WebKit/Source/platform/WebTaskRunner.cpp:75
    #26 0x1a66db69 in Invoke<base::WeakPtr<blink::TaskHandle::Runner>, blink::TaskHandle> base/bind_internal.h:211:12
    #27 0x1a66db69 in MakeItSo<void (blink::TaskHandle::Runner::*)(const blink::TaskHandle &), base::WeakPtr<blink::TaskHandle::Runner>, blink::TaskHandle> base/bind_internal.h:314
    #28 0x1a66db69 in RunImpl<void (blink::TaskHandle::Runner::*)(const blink::TaskHandle &), std::__1::tuple<base::WeakPtr<blink::TaskHandle::Runner>, blink::TaskHandle>, 0, 1> base/bind_internal.h:368
    #29 0x1a66db69 in base::internal::Invoker<base::internal::BindState<void (blink::TaskHandle::Runner::*)(blink::TaskHandle const&), base::WeakPtr<blink::TaskHandle::Runner>, blink::TaskHandle>, void ()>::RunOnce(base::internal::BindStateBase*) base/bind_internal.h:336
    #30 0xd309cf0 in Run base/callback.h:65:12
    #31 0xd309cf0 in RunInternal third_party/WebKit/Source/platform/wtf/Functional.h:258
    #32 0xd309cf0 in WTF::ThreadCheckingCallbackWrapper<base::OnceCallback<void ()>, void ()>::Run() third_party/WebKit/Source/platform/wtf/Functional.h:245
    #33 0xdc8b6f2 in Run base/callback.h:65:12
    #34 0xdc8b6f2 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55
    #35 0xd430ded in blink::scheduler::TaskQueueManager::ProcessTaskFromWorkQueue(blink::scheduler::internal::WorkQueue*, blink::scheduler::LazyNow, base::TimeTicks*) third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc:543:21
    #36 0xd42efc6 in blink::scheduler::TaskQueueManager::DoWork(blink::scheduler::internal::Sequence::WorkType) third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc:343:13
    #37 0xd44011e in Invoke<const base::WeakPtr<blink::scheduler::TaskQueueManager> &, const blink::scheduler::internal::Sequence::WorkType &> base/bind_internal.h:211:12
    #38 0xd44011e in MakeItSo<void (blink::scheduler::TaskQueueManager::*const &)(blink::scheduler::internal::Sequence::WorkType), const base::WeakPtr<blink::scheduler::TaskQueueManager> &, const blink::scheduler::internal::Sequence::WorkType &> base/bind_internal.h:314
    #39 0xd44011e in RunImpl<void (blink::scheduler::TaskQueueManager::*const &)(blink::scheduler::internal::Sequence::WorkType), const std::__1::tuple<base::WeakPtr<blink::scheduler::TaskQueueManager>, blink::scheduler::internal::Sequence::WorkType> &, 0, 1> base/bind_internal.h:368
    #40 0xd44011e in base::internal::Invoker<base::internal::BindState<void (blink::scheduler::TaskQueueManager::*)(blink::scheduler::internal::Sequence::WorkType), base::WeakPtr<blink::scheduler::TaskQueueManager>, blink::scheduler::internal::Sequence::WorkType>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:350
    #41 0xdc8b6f2 in Run base/callback.h:65:12
    #42 0xdc8b6f2 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55
    #43 0xd445dc6 in blink::scheduler::internal::ThreadControllerImpl::DoWork(blink::scheduler::internal::Sequence::WorkType) third_party/WebKit/Source/platform/scheduler/base/thread_controller_impl.cc:99:19
    #44 0xd44827e in Invoke<const base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> &, const blink::scheduler::internal::Sequence::WorkType &> base/bind_internal.h:211:12
    #45 0xd44827e in MakeItSo<void (blink::scheduler::internal::ThreadControllerImpl::*const &)(blink::scheduler::internal::Sequence::WorkType), const base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> &, const blink::scheduler::internal::Sequence::WorkType &> base/bind_internal.h:314
    #46 0xd44827e in RunImpl<void (blink::scheduler::internal::ThreadControllerImpl::*const &)(blink::scheduler::internal::Sequence::WorkType), const std::__1::tuple<base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::Sequence::WorkType> &, 0, 1> base/bind_internal.h:368
    #47 0xd44827e in base::internal::Invoker<base::internal::BindState<void (blink::scheduler::internal::ThreadControllerImpl::*)(blink::scheduler::internal::Sequence::WorkType), base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::Sequence::WorkType>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:350
    #48 0xdc8b6f2 in Run base/callback.h:65:12
    #49 0xdc8b6f2 in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55
    #50 0xdf16f50 in base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:124:19
    #51 0xdd04b0c in base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:399:25
    #52 0xdd056d8 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:411:5
    #53 0xdd06030 in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:455:16
Direct leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0x97d653 in __interceptor_malloc /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_malloc_linux.cc:88:3
    #1 0x19ba2350 in PartitionAllocGenericFlags base/allocator/partition_allocator/partition_alloc.h:946:18
    #2 0x19ba2350 in Alloc base/allocator/partition_allocator/partition_alloc.h:966
    #3 0x19ba2350 in BufferMalloc third_party/WebKit/Source/platform/wtf/allocator/Partitions.h:109
    #4 0x19ba2350 in WTF::PartitionAllocator::AllocateBacking(unsigned long, char const*) third_party/WebKit/Source/platform/wtf/allocator/PartitionAllocator.cpp:13
    #5 0x1a7b1e42 in AllocateHashTableBacking<WTF::KeyValuePair<int, WTF::AtomicString>, WTF::HashTable<int, WTF::KeyValuePair<int, WTF::AtomicString>, WTF::KeyValuePairKeyExtractor, WTF::IntHash<unsigned int>, WTF::HashMapValueTraits<blink::GenericFontFamilySettings::UScriptCodeHashTraits, WTF::HashTraits<WTF::AtomicString> >, blink::GenericFontFamilySettings::UScriptCodeHashTraits, WTF::PartitionAllocator> > third_party/WebKit/Source/platform/wtf/allocator/PartitionAllocator.h:77:9
    #6 0x1a7b1e42 in AllocateTable third_party/WebKit/Source/platform/wtf/HashTable.h:1590
    #7 0x1a7b1e42 in WTF::HashTable<int, WTF::KeyValuePair<int, WTF::AtomicString>, WTF::KeyValuePairKeyExtractor, WTF::IntHash<unsigned int>, WTF::HashMapValueTraits<blink::GenericFontFamilySettings::UScriptCodeHashTraits, WTF::HashTraits<WTF::AtomicString> >, blink::GenericFontFamilySettings::UScriptCodeHashTraits, WTF::PartitionAllocator>::Rehash(unsigned int, WTF::KeyValuePair<int, WTF::AtomicString>*) third_party/WebKit/Source/platform/wtf/HashTable.h:1798
    #8 0x1a7b19dc in WTF::HashTable<int, WTF::KeyValuePair<int, WTF::AtomicString>, WTF::KeyValuePairKeyExtractor, WTF::IntHash<unsigned int>, WTF::HashMapValueTraits<blink::GenericFontFamilySettings::UScriptCodeHashTraits, WTF::HashTraits<WTF::AtomicString> >, blink::GenericFontFamilySettings::UScriptCodeHashTraits, WTF::PartitionAllocator>::ReserveCapacityForSize(unsigned int) third_party/WebKit/Source/platform/wtf/HashTable.h:1014:5
    #9 0x1a7b1143 in WTF::HashTable<int, WTF::KeyValuePair<int, WTF::AtomicString>, WTF::KeyValuePairKeyExtractor, WTF::IntHash<unsigned int>, WTF::HashMapValueTraits<blink::GenericFontFamilySettings::UScriptCodeHashTraits, WTF::HashTraits<WTF::AtomicString> >, blink::GenericFontFamilySettings::UScriptCodeHashTraits, WTF::PartitionAllocator>::HashTable(WTF::HashTable<int, WTF::KeyValuePair<int, WTF::AtomicString>, WTF::KeyValuePairKeyExtractor, WTF::IntHash<unsigned int>, WTF::HashMapValueTraits<blink::GenericFontFamilySettings::UScriptCodeHashTraits, WTF::HashTraits<WTF::AtomicString> >, blink::GenericFontFamilySettings::UScriptCodeHashTraits, WTF::PartitionAllocator> const&) third_party/WebKit/Source/platform/wtf/HashTable.h:1859:5
    #10 0x1a7aca9e in HashMap third_party/WebKit/Source/platform/wtf/HashMap.h:99:3
    #11 0x1a7aca9e in blink::GenericFontFamilySettings::GenericFontFamilySettings(blink::GenericFontFamilySettings const&) third_party/WebKit/Source/platform/fonts/GenericFontFamilySettings.cpp:41
    #12 0x22bd4eef in blink::CSSFontSelector::CSSFontSelector(blink::Document*) third_party/WebKit/Source/core/css/CSSFontSelector.cpp:48:7
    #13 0x1ae90aca in Create third_party/WebKit/Source/core/css/CSSFontSelector.h:46:16
    #14 0x1ae90aca in blink::StyleEngine::StyleEngine(blink::Document&) third_party/WebKit/Source/core/css/StyleEngine.cpp:76
    #15 0x1b443002 in Create third_party/WebKit/Source/core/css/StyleEngine.h:92:16
    #16 0x1b443002 in blink::Document::Document(blink::DocumentInit const&, unsigned char) third_party/WebKit/Source/core/dom/Document.cpp:720
    #17 0x1c061d6f in blink::HTMLDocument::HTMLDocument(blink::DocumentInit const&, unsigned char) third_party/WebKit/Source/core/html/HTMLDocument.cpp:67:7
    #18 0x1b417e9a in Create third_party/WebKit/Source/core/html/HTMLDocument.h:37:16
    #19 0x1b417e9a in blink::DOMImplementation::createDocument(WTF::String const&, blink::DocumentInit const&, bool) third_party/WebKit/Source/core/dom/DOMImplementation.cpp:233
    #20 0x1bd98388 in blink::LocalDOMWindow::CreateDocument(WTF::String const&, blink::DocumentInit const&, bool) third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp:299:16
    #21 0x1bd98864 in blink::LocalDOMWindow::InstallNewDocument(WTF::String const&, blink::DocumentInit const&, bool) third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp:321:15
    #22 0x1d2e39b9 in blink::DocumentLoader::InstallNewDocument(blink::KURL const&, blink::Document*, blink::WebGlobalObjectReusePolicy, WTF::AtomicString const&, WTF::AtomicString const&, blink::DocumentLoader::InstallNewDocumentReason, blink::ParserSynchronizationPolicy, blink::KURL const&) third_party/WebKit/Source/core/loader/DocumentLoader.cpp:1051:45
    #23 0x1d2e2fc7 in blink::DocumentLoader::CommitNavigation(WTF::AtomicString const&, blink::KURL const&) third_party/WebKit/Source/core/loader/DocumentLoader.cpp:694:3
    #24 0x1d2df37b in blink::DocumentLoader::CommitData(char const*, unsigned long) third_party/WebKit/Source/core/loader/DocumentLoader.cpp:707:3
    #25 0x1d2de0d4 in blink::DocumentLoader::FinishedLoading(double) third_party/WebKit/Source/core/loader/DocumentLoader.cpp:462:7
    #26 0x1d2e589b in blink::DocumentLoader::MaybeLoadEmpty() third_party/WebKit/Source/core/loader/DocumentLoader.cpp:842:3
    #27 0x1d2e5c9b in blink::DocumentLoader::StartLoading() third_party/WebKit/Source/core/loader/DocumentLoader.cpp:852:7
    #28 0x1d312171 in blink::FrameLoader::Init() third_party/WebKit/Source/core/loader/FrameLoader.cpp:288:33
    #29 0x1bdd0e6f in blink::LocalFrame::Init() third_party/WebKit/Source/core/frame/LocalFrame.cpp:164:11
    #30 0x1bf46685 in blink::WebLocalFrameImpl::InitializeCoreFrame(blink::Page&, blink::FrameOwner*, WTF::AtomicString const&) third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp:1754:11
    #31 0x1bf45688 in blink::WebLocalFrameImpl::CreateMainFrame(blink::WebView*, blink::WebFrameClient*, blink::InterfaceRegistry*, blink::WebFrame*, blink::WebString const&, blink::WebSandboxFlags) third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp:1632:10
    #32 0x1f82c14d in content::RenderFrameImpl::CreateMainFrame(content::RenderViewImpl*, int, mojo::InterfacePtr<service_manager::mojom::InterfaceProvider>, int, bool, content::ScreenInfo const&, content::CompositorDependencies*, blink::WebFrame*, base::UnguessableToken const&, content::FrameReplicationState const&, bool) content/renderer/render_frame_impl.cc:1087:30
    #33 0x1f933400 in content::RenderViewImpl::Initialize(mojo::StructPtr<content::mojom::CreateViewParams>, base::RepeatingCallback<void (content::RenderWidget*, blink::WebNavigationPolicy, gfx::Rect const&)> const&) content/renderer/render_view_impl.cc:608:26
    #34 0x1f93b83b in content::RenderViewImpl::Create(content::CompositorDependencies*, mojo::StructPtr<content::mojom::CreateViewParams>, base::RepeatingCallback<void (content::RenderWidget*, blink::WebNavigationPolicy, gfx::Rect const&)> const&, scoped_refptr<base::SingleThreadTaskRunner>) content/renderer/render_view_impl.cc:1027:16
    #35 0x1f9143dc in content::RenderThreadImpl::CreateView(mojo::StructPtr<content::mojom::CreateViewParams>) content/renderer/render_thread_impl.cc:2169:3
    #36 0x6269026 in content::mojom::RendererStubDispatch::Accept(content::mojom::Renderer*, mojo::Message*) out/Release/gen/content/common/renderer.mojom.cc:745:13
    #37 0x123cb0e2 in mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message*) mojo/public/cpp/bindings/lib/interface_endpoint_client.cc:419:32
    #38 0x12426027 in mojo::FilterChain::Accept(mojo::Message*) mojo/public/cpp/bindings/lib/filter_chain.cc:40:17

and so on - there are others.
 
Components: -Blink

Comment 2 by ssid@chromium.org, Jan 24 2018

Cc: palmer@chromium.org haraken@chromium.org kouhei@chromium.org
Components: -Internals>Instrumentation>Memory Blink>HTML>Parser
Owner: hirosh...@chromium.org
Summary: BackgroundHTMLParser leaks strings in MemoryTracingBrowserTest on Lsan (was: MemoryTracingBrowserTest.TestMemoryInfra is flaky on LSan)
Looks like blink html parser is leaking strings?
Either that or partition alloc keeps freelist cache after the allocations are freed and these are shown as leaks.
Not sure who's the right owner in blink.

+palmer for partition alloc.

Comment 3 by ssid@chromium.org, Jan 24 2018

Cc: ssid@chromium.org

Comment 5 by ssid@chromium.org, Jan 26 2018

 Issue 806310  has been merged into this issue.

Sign in to add a comment