<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>141612</bug_id>
          
          <creation_ts>2015-02-14 18:25:38 -0800</creation_ts>
          <short_desc>RenderMultiColumnSpannerPlaceholder leaks seen on leaks bot</short_desc>
          <delta_ts>2015-03-03 10:30:49 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=140899</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=137273</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joseph Pecoraro">joepeck</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>darin</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>hyatt</cc>
    
    <cc>joepeck</cc>
    
    <cc>kling</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1069248</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2015-02-14 18:25:38 -0800</bug_when>
    <thetext>* SUMMARY
RenderMultiColumnSpannerPlaceholder leaks seen on leaks bot:
https://build.webkit.org/builders/Apple%20Yosemite%20%28Leaks%29/builds/325

Not sure exactly which tests, but it looks like these are only created in one way.

Leak: 0x7fcf42c972b0  size=96  zone: DefaultMallocZone_0x100528000
	0x00000001 0xf0000000 0x42d27cd0 0x00007fcf 	.........|.B....
	0x42d27d20 0x00007fcf 0x42d27d50 0x00007fcf 	 }.B....P}.B....
	0x42d27db0 0x00007fcf 0x42d27f00 0x00007fcf 	.}.B.......B....
	0x4c7ee3c0 0x00007fcf 0x48f80720 0x00007fcf 	..~L.... ..H....
	0x00000000 0x00000000 0x42d286c0 0x00007fcf 	...........B....
	0x4006e000 0x00000080 0x000001c0 0x00000000 	...@............
	Call stack: [thread 0x7fff7d157300]: 
        | 0x2 
        | start 
        | main DumpRenderTreeMain.mm:30 
        | DumpRenderTreeMain(int, char const**) DumpRenderTree.mm:1301 
        | dumpRenderTree(int, char const**) DumpRenderTree.mm:1179 
        | runTestingServerLoop() DumpRenderTree.mm:1070 
        | runTest(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt; const&amp;) DumpRenderTree.mm:1886 
        | CFRunLoopRunSpecific 
        | __CFRunLoopRun 
        | __CFRunLoopDoSources0 
        | __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ 
        | MultiplexerSource::_perform(void*) 
        | MultiplexerSource::perform() 
        | RunloopBlockContext::perform() 
        | CFArrayApplyFunction 
        | RunloopBlockContext::_invoke_block(void const*, void*) 
        | ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 
        | ___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke 
        | -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] 
        | -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] 
        | __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke 
        | -[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:] WebCoreResourceHandleAsDelegate.mm:261 
        | WebCore::ResourceLoader::didFinishLoading(WebCore::ResourceHandle*, double) ResourceLoader.cpp:543 
        | WebCore::SubresourceLoader::didFinishLoading(double) SubresourceLoader.cpp:366 
        | WebCore::CachedRawResource::finishLoading(WebCore::SharedBuffer*) CachedRawResource.cpp:105 
        | WebCore::CachedResource::finishLoading(WebCore::SharedBuffer*) CachedResource.cpp:310 
        | WebCore::CachedResource::checkNotify() CachedResource.cpp:293 
        | WebCore::DocumentLoader::notifyFinished(WebCore::CachedResource*) DocumentLoader.cpp:376 
        | WebCore::DocumentLoader::finishedLoading(double) DocumentLoader.cpp:442 
        | WebCore::DocumentWriter::end() DocumentWriter.cpp:248 
        | WebCore::HTMLDocumentParser::finish() HTMLDocumentParser.cpp:452 
        | WebCore::HTMLDocumentParser::attemptToEnd() HTMLDocumentParser.cpp:424 
        | WebCore::HTMLDocumentParser::prepareToStopParsing() HTMLDocumentParser.cpp:133 
        | WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd() HTMLDocumentParser.cpp:412 
        | WebCore::HTMLDocumentParser::end() HTMLDocumentParser.cpp:403 
        | WebCore::HTMLTreeBuilder::finished() HTMLTreeBuilder.cpp:2942 
        | WebCore::HTMLConstructionSite::finishedParsing() HTMLConstructionSite.cpp:405 
        | WebCore::Document::finishedParsing() Document.cpp:4629 
        | WebCore::FrameLoader::finishedParsing() FrameLoader.cpp:763 
        | WebCore::FrameLoader::checkCompleted() FrameLoader.cpp:843 
        | WebCore::FrameLoader::checkCallImplicitClose() FrameLoader.cpp:896 
        | WebCore::Document::implicitClose() Document.cpp:2457 
        | WebCore::Document::dispatchWindowLoadEvent() Document.cpp:3814 
        | WebCore::DOMWindow::dispatchLoadEvent() DOMWindow.cpp:1855 
        | WebCore::DOMWindow::dispatchEvent(WTF::PassRefPtr&lt;WebCore::Event&gt;, WTF::PassRefPtr&lt;WebCore::EventTarget&gt;) DOMWindow.cpp:1897 
        | WebCore::EventTarget::fireEventListeners(WebCore::Event*) EventTarget.cpp:207 
        | WebCore::EventTarget::fireEventListeners(WebCore::Event*, WebCore::EventTargetData*, WTF::Vector&lt;WebCore::RegisteredEventListener, 1ul, WTF::CrashOnOverflow&gt;&amp;) EventTarget.cpp:256 
        | WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) JSEventListener.cpp:127 
        | WebCore::JSMainThreadExecState::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;, JSC::JSValue*) JSMainThreadExecState.h:56 
        | JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;, JSC::JSValue*) CallData.cpp:44 
        | JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) CallData.cpp:39 
        | JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) Interpreter.cpp:912 
        | JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) JITCode.cpp:77 
        | vmEntryToJavaScript 
        | llint_entry 
        | llint_entry 
        | llint_slow_path_get_by_id LLIntSlowPaths.cpp:581 
        | JSC::JSValue::get(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&amp;) const JSCJSValueInlines.h:703 
        | JSC::PropertySlot::getValue(JSC::ExecState*, JSC::PropertyName) const PropertySlot.h:256 
        | WebCore::jsElementOffsetTop(JSC::ExecState*, JSC::JSObject*, long long, JSC::PropertyName) JSElement.cpp:640 
        | WebCore::Element::offsetTop() Element.cpp:706 
        | WebCore::Document::updateLayoutIgnorePendingStylesheets(WebCore::Document::RunPostLayoutTasks) Document.cpp:1871 
        | WebCore::Document::updateLayout() Document.cpp:1837 
        | WebCore::FrameView::layout(bool) FrameView.cpp:1333 
        | WebCore::RenderView::layout() RenderView.cpp:359 
        | WebCore::RenderView::layoutContent(WebCore::LayoutState const&amp;) RenderView.cpp:233 
        | WebCore::RenderBlock::layout() RenderBlock.cpp:930 
        | WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) RenderBlockFlow.cpp:484 
        | WebCore::RenderBlockFlow::layoutBlockChildren(bool, WebCore::LayoutUnit&amp;) RenderBlockFlow.cpp:629 
        | WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox&amp;, WebCore::RenderBlockFlow::MarginInfo&amp;, WebCore::LayoutUnit&amp;, WebCore::LayoutUnit&amp;) RenderBlockFlow.cpp:708 
        | WebCore::RenderBlock::layout() RenderBlock.cpp:930 
        | WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) RenderBlockFlow.cpp:484 
        | WebCore::RenderBlockFlow::layoutBlockChildren(bool, WebCore::LayoutUnit&amp;) RenderBlockFlow.cpp:629 
        | WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox&amp;, WebCore::RenderBlockFlow::MarginInfo&amp;, WebCore::LayoutUnit&amp;, WebCore::LayoutUnit&amp;) RenderBlockFlow.cpp:708 
        | WebCore::RenderBlock::layout() RenderBlock.cpp:930 
        | WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) RenderBlockFlow.cpp:484 
        | WebCore::RenderBlockFlow::layoutBlockChildren(bool, WebCore::LayoutUnit&amp;) RenderBlockFlow.cpp:622 
        | WebCore::RenderBlockFlow::insertFloatingObject(WebCore::RenderBox&amp;) RenderBlockFlow.cpp:2231 
        | WebCore::RenderElement::layoutIfNeeded() RenderElement.h:119 
        | WebCore::RenderBlock::layout() RenderBlock.cpp:930 
        | WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) RenderBlockFlow.cpp:484 
        | WebCore::RenderBlockFlow::layoutBlockChildren(bool, WebCore::LayoutUnit&amp;) RenderBlockFlow.cpp:629 
        | WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox&amp;, WebCore::RenderBlockFlow::MarginInfo&amp;, WebCore::LayoutUnit&amp;, WebCore::LayoutUnit&amp;) RenderBlockFlow.cpp:708 
        | WebCore::RenderBlock::layout() RenderBlock.cpp:930 
        | WebCore::RenderBlockFlow::layoutBlock(bool, WebCore::LayoutUnit) RenderBlockFlow.cpp:434 
        | WebCore::RenderBlockFlow::recomputeLogicalWidthAndColumnWidth() RenderBlockFlow.cpp:384 
        | WebCore::RenderBlockFlow::computeColumnCountAndWidth() RenderBlockFlow.cpp:423 
        | WebCore::RenderBlockFlow::setComputedColumnCountAndWidth(int, WebCore::LayoutUnit) RenderBlockFlow.cpp:3791 
        | WebCore::RenderBlockFlow::createMultiColumnFlowThread() RenderBlockFlow.cpp:128 
        | WebCore::RenderMultiColumnFlowThread::populate() RenderMultiColumnFlowThread.cpp:159 
        | WebCore::RenderBoxModelObject::moveChildrenTo(WebCore::RenderBoxModelObject*, WebCore::RenderObject*, WebCore::RenderObject*, bool) RenderBoxModelObject.h:306 
        | WebCore::RenderBoxModelObject::moveChildrenTo(WebCore::RenderBoxModelObject*, WebCore::RenderObject*, WebCore::RenderObject*, WebCore::RenderObject*, bool) RenderBoxModelObject.cpp:2740 
        | WebCore::RenderBoxModelObject::moveChildTo(WebCore::RenderBoxModelObject*, WebCore::RenderObject*, WebCore::RenderObject*, bool) RenderBoxModelObject.cpp:2701 
        | WebCore::RenderBlockFlow::addChild(WebCore::RenderObject*, WebCore::RenderObject*) RenderBlockFlow.cpp:3728 
        | WebCore::RenderBlock::addChild(WebCore::RenderObject*, WebCore::RenderObject*) RenderBlock.cpp:406 
        | WebCore::RenderBlock::addChildIgnoringContinuation(WebCore::RenderObject*, WebCore::RenderObject*) RenderBlock.cpp:492 
        | WebCore::RenderElement::addChild(WebCore::RenderObject*, WebCore::RenderObject*) RenderElement.cpp:511 
        | WebCore::RenderElement::insertChildInternal(WebCore::RenderObject*, WebCore::RenderObject*, WebCore::RenderElement::NotifyChildrenType) RenderElement.cpp:586 
        | WebCore::RenderBlockFlow::insertedIntoTree() RenderBlockFlow.cpp:140 
        | WebCore::RenderElement::insertedIntoTree() RenderElement.cpp:1034 
        | WebCore::RenderObject::insertedIntoTree() RenderObject.cpp:1917 
        | WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted(WebCore::RenderObject*) RenderMultiColumnFlowThread.cpp:400 
        | WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant(WebCore::RenderObject*&amp;, WebCore::RenderObject*) RenderMultiColumnFlowThread.cpp:307 
        | WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous(WebCore::RenderMultiColumnFlowThread*, WebCore::RenderBox*, WebCore::RenderStyle*) RenderMultiColumnSpannerPlaceholder.cpp:39 
        | WebCore::RenderStyle::createAnonymousStyleWithDisplay(WebCore::RenderStyle const*, WebCore::EDisplay) RenderStyle.cpp:102 
        | WebCore::RenderStyle::create() RenderStyle.cpp:91 
        | WTF::RefCounted&lt;WebCore::RenderStyle&gt;::operator new(unsigned long) RefCounted.h:141 
        | WTF::fastMalloc(unsigned long) FastMalloc.cpp:275 
        | bmalloc::api::malloc(unsigned long) bmalloc.h:36 
        | bmalloc::Cache::allocate(unsigned long) Cache.h:68 
        | bmalloc::Allocator::allocate(unsigned long) Allocator.h:85 
        | bmalloc::Allocator::allocateSlowCase(unsigned long) Allocator.cpp:195 
        | malloc 
        | malloc_zone_malloc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1069249</commentid>
    <comment_count>1</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2015-02-14 18:27:13 -0800</bug_when>
    <thetext>I&apos;m unfamiliar with the render tree code. It doesn&apos;t appear to use any of our common smart pointers. What should the lifetime be / Who should delete this object?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1069476</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-02-16 10:07:04 -0800</bug_when>
    <thetext>This is an intentional (for now) leak, see &lt;http://trac.webkit.org/changeset/175641&gt;.

That said, it certainly needs to be fixed eventually.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1071134</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-02-22 22:35:45 -0800</bug_when>
    <thetext>In the meanwhile, we should add the leak to Tools/Scripts/webkitpy/port/leakdetector.py</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1073049</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2015-02-28 11:21:04 -0800</bug_when>
    <thetext>Are you sure this is intentional?  The ChangeLog talks about leaking the placeholder, not the RenderStyle it uses.

Am I missing something?

diff --git a/Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp b/Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp
index 6d7e9f1..f871aa2 100644
--- a/Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp
+++ b/Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp
@@ -36,9 +36,9 @@ namespace WebCore {
 
 RenderMultiColumnSpannerPlaceholder* RenderMultiColumnSpannerPlaceholder::createAnonymous(RenderMultiColumnFlowThread* flowThread, RenderBox* spanner, RenderStyle* parentStyle)
 {
-    RefPtr&lt;RenderStyle&gt; newStyle(RenderStyle::createAnonymousStyleWithDisplay(parentStyle, BLOCK));
+    auto newStyle = RenderStyle::createAnonymousStyleWithDisplay(parentStyle, BLOCK);
     newStyle-&gt;setClear(CBOTH); // We don&apos;t want floats in the row preceding the spanner to continue on the other side.
-    auto placeholder = new RenderMultiColumnSpannerPlaceholder(flowThread, spanner, *newStyle);
+    auto placeholder = new RenderMultiColumnSpannerPlaceholder(flowThread, spanner, WTF::move(newStyle));
     placeholder-&gt;initializeStyle();
     return placeholder;
 }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1073705</commentid>
    <comment_count>5</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2015-03-03 10:30:49 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; Are you sure this is intentional?  The ChangeLog talks about leaking the
&gt; placeholder, not the RenderStyle it uses.
&gt; 
&gt; Am I missing something?

I am missing something!  Both the RenderMultiColumnSpannerPlaceholder and the RenderStyle are leaked, which is expected based on the comment.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>