<?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>37527</bug_id>
          
          <creation_ts>2010-04-13 15:44:39 -0700</creation_ts>
          <short_desc>REGRESSION(r57511): many new graphics / svg related leaks</short_desc>
          <delta_ts>2010-04-14 00:10:15 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Maciej Stachowiak">mjs</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hamaji</cc>
    
    <cc>krit</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>212118</commentid>
    <comment_count>0</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2010-04-13 15:44:39 -0700</bug_when>
    <thetext>On the leak bot, r57511 seems to have caused many new leaks to appear in SVG and graphics code. See the DumpRenderTreeLeaks files here:

http://build.webkit.org/results/SnowLeopard%20Intel%20Leaks/r57511%20%285915%29/

The previous revision had much fewer leaks:

http://build.webkit.org/results/SnowLeopard%20Intel%20Leaks/r57510%20%285914%29/

Here is what the first leak looks like, there are many like this:

Process 16237: 598637 nodes malloced for 99435 KB
Process 16237: 502 leaks for 110384 total leaked bytes.
Leak: 0x13e5af000  size=11264  zone: DefaultMallocZone_0x1051ed000	
	0x00000000 0x00000000 0x00000000 0x00000000 	................
	0x00000000 0x00000000 0x00000000 0x00000000 	................
	0x00000000 0x00000000 0x00000000 0x00000000 	................
	0x00000000 0x00000000 0x00000000 0x00000000 	................
	0x00000000 0x00000000 0x00000000 0x00000000 	................
	0x00000000 0x00000000 0x00000000 0x00000000 	................
	0x00000000 0x00000000 0x00000000 0x00000000 	................
	0x00000000 0x00000000 0x00000000 0x00000000 	................
	...
	Call stack: [thread 0x7fff71041be0]: | start | main | dumpRenderTree(int, char const**) | runTestingServerLoop() | runTest(std::string const&amp;) | -[NSRunLoop(NSRunLoop) runMode:beforeDate:] | CFRunLoopRunSpecific | __CFRunLoopRun | __CFRunLoopDoSources0 | MultiplexerSource::perform() | URLConnectionClient::processEvents() | URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo&lt;XClientEvent, XClientEventParams&gt;*, long) | URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo&lt;XClientEvent, XClientEventParams&gt;*, long) | URLConnectionClient::_clientDidFinishLoading(URLConnectionClient::ClientConnectionEventQueue*) | _NSURLConnectionDidFinishLoading | -[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:] | WebCore::ResourceLoader::didFinishLoading(WebCore::ResourceHandle*) | WebCore::MainResourceLoader::didFinishLoading() | WebCore::FrameLoader::finishedLoading() | WebCore::FrameLoader::checkLoadComplete() | WebCore::FrameLoader::recursiveCheckLoadComplete() | WebCore::FrameLoader::checkLoadCompleteForThisFrame() | WebFrameLoaderClient::dispatchDidFinishLoad() | CallFrameLoadDelegate(objc_object* (*)(objc_object*, objc_selector*, ...), WebView*, objc_selector*, objc_object*) | CallDelegate(objc_object* (*)(objc_object*, objc_selector*, ...), WebView*, objc_object*, objc_selector*, objc_object*) | -[FrameLoadDelegate webView:didFinishLoadForFrame:] | -[NSView displayIfNeeded] | -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] | -[NSNextStepFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] | -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] | -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] | -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] | -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] | -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] | -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] | -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] | -[WebHTMLView(WebPrivate) _recursiveDisplayAllDirtyWithLockFocus:visRect:] | -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] | -[NSView _drawRect:clip:] | -[WebHTMLView drawRect:] | -[WebHTMLView drawSingleRect:] | -[WebFrame(WebInternal) _drawRect:contentsOnly:] | WebCore::FrameView::paintContents(WebCore::GraphicsContext*, WebCore::IntRect const&amp;) | WebCore::RenderLayer::paint(WebCore::GraphicsContext*, WebCore::IntRect const&amp;, unsigned int, WebCore::RenderObject*) | WebCore::RenderLayer::paintLayer(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::IntRect const&amp;, unsigned int, WebCore::RenderObject*, WTF::HashMap&lt;WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash&lt;WebCore::OverlapTestRequestClient*&gt;, WTF::HashTraits&lt;WebCore::OverlapTestRequestClient*&gt;, WTF::HashTraits&lt;WebCore::IntRect&gt; &gt;*, unsigned int) | WebCore::RenderLayer::paintLayer(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::IntRect const&amp;, unsigned int, WebCore::RenderObject*, WTF::HashMap&lt;WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash&lt;WebCore::OverlapTestRequestClient*&gt;, WTF::HashTraits&lt;WebCore::OverlapTestRequestClient*&gt;, WTF::HashTraits&lt;WebCore::IntRect&gt; &gt;*, unsigned int) | WebCore::RenderSVGRoot::paint(WebCore::RenderObject::PaintInfo&amp;, int, int) | WebCore::RenderBox::paint(WebCore::RenderObject::PaintInfo&amp;, int, int) | WebCore::RenderSVGContainer::paint(WebCore::RenderObject::PaintInfo&amp;, int, int) | WebCore::RenderSVGContainer::paint(WebCore::RenderObject::PaintInfo&amp;, int, int) | WebCore::RenderPath::paint(WebCore::RenderObject::PaintInfo&amp;, int, int) | WebCore::SVGRenderBase::prepareToRenderSVGContent(WebCore::RenderObject*, WebCore::RenderObject::PaintInfo&amp;, WebCore::FloatRect const&amp;, WebCore::SVGResourceFilter*&amp;, WebCore::SVGResourceFilter*) | WebCore::RenderSVGResourceClipper::applyResource(WebCore::RenderObject*, WebCore::GraphicsContext*) | WebCore::RenderSVGResourceClipper::applyClippingToContext(WebCore::RenderObject*, WebCore::FloatRect const&amp;, WebCore::FloatRect const&amp;, WebCore::GraphicsContext*) | WebCore::GraphicsContext::clipToImageBuffer(WebCore::FloatRect const&amp;, WebCore::ImageBuffer const*) | WebCore::ImageBuffer::image() const | CGBitmapContextCreateImage | CGDataProviderCreateWithCopyOfData | malloc | malloc_zone_malloc 
Leak: 0x113206400  size=2048  zone: DefaultMallocZone_0x1051ed000	string &apos;&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>212121</commentid>
    <comment_count>1</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2010-04-13 15:49:05 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/57511</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>212129</commentid>
    <comment_count>2</comment_count>
    <who name="Shinichiro Hamaji">hamaji</who>
    <bug_when>2010-04-13 16:00:14 -0700</bug_when>
    <thetext>It looks like we need to call delete values of m_clipper in ~RenderSVGResourceClipper(). Maybe we should call deleteAllValues(m_clipper) or invalidateClients().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>212241</commentid>
    <comment_count>3</comment_count>
      <attachid>53320</attachid>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2010-04-13 22:58:13 -0700</bug_when>
    <thetext>Created attachment 53320
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>212242</commentid>
    <comment_count>4</comment_count>
      <attachid>53320</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-04-13 23:06:19 -0700</bug_when>
    <thetext>Comment on attachment 53320
Patch

Looks reasonable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>212249</commentid>
    <comment_count>5</comment_count>
      <attachid>53320</attachid>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2010-04-13 23:13:13 -0700</bug_when>
    <thetext>Comment on attachment 53320
Patch

Clearing flags on attachment: 53320

Committed r57564: &lt;http://trac.webkit.org/changeset/57564&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>212250</commentid>
    <comment_count>6</comment_count>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2010-04-13 23:13:22 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>212283</commentid>
    <comment_count>7</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2010-04-14 00:10:15 -0700</bug_when>
    <thetext>Oops, /me hides in a dark corner.
I could have sworn it said &quot;delete m_clipper.take(..)&quot; .... and the dtor, I just missed it. In fact it was in an earlier patch, that wasn&apos;t uploaded. Sorry for the trouble, glad that we have a leak bot!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>53320</attachid>
            <date>2010-04-13 22:58:13 -0700</date>
            <delta_ts>2010-04-13 23:13:13 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-37527-20100414075811.patch</filename>
            <type>text/plain</type>
            <size>1529</size>
            <attacher name="Dirk Schulze">krit</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA1NzU1OSkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTcgQEAKKzIwMTAtMDQtMTMgIERpcmsgU2NodWx6ZSAgPGtyaXRAd2Via2l0Lm9y
Zz4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBSRUdS
RVNTSU9OKHI1NzUxMSk6IG1hbnkgbmV3IGdyYXBoaWNzIC8gc3ZnIHJlbGF0ZWQgbGVha3MKKyAg
ICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTM3NTI3CisKKyAg
ICAgICAgVGhlIGNvbnRlbnQgb2YgYSBIYXNoTWFwIHdhcyBub3QgY29ycmVjdGx5IGRlbGV0ZWQu
IEZpeGVkIHRoaXMKKyAgICAgICAgaW4gdGhlIERUb3IgYW5kIGluIGludmFsaWRhdGVDbGllbnQg
b2YgUmVuZGVyU1ZHUmVzb3VyY2VDbGlwcGVyLgorCisgICAgICAgICogcmVuZGVyaW5nL1JlbmRl
clNWR1Jlc291cmNlQ2xpcHBlci5jcHA6CisgICAgICAgIChXZWJDb3JlOjpSZW5kZXJTVkdSZXNv
dXJjZUNsaXBwZXI6On5SZW5kZXJTVkdSZXNvdXJjZUNsaXBwZXIpOgorICAgICAgICAoV2ViQ29y
ZTo6UmVuZGVyU1ZHUmVzb3VyY2VDbGlwcGVyOjppbnZhbGlkYXRlQ2xpZW50KToKKwogMjAxMC0w
NC0xMyAgWmhlbnlhbyBNbyAgPHptb0Bnb29nbGUuY29tPgogCiAgICAgICAgIFJldmlld2VkIGJ5
IE9saXZlciBIdW50LgpJbmRleDogV2ViQ29yZS9yZW5kZXJpbmcvUmVuZGVyU1ZHUmVzb3VyY2VD
bGlwcGVyLmNwcAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09Ci0tLSBXZWJDb3JlL3JlbmRlcmluZy9SZW5kZXJTVkdSZXNv
dXJjZUNsaXBwZXIuY3BwCShyZXZpc2lvbiA1NzUxMSkKKysrIFdlYkNvcmUvcmVuZGVyaW5nL1Jl
bmRlclNWR1Jlc291cmNlQ2xpcHBlci5jcHAJKHdvcmtpbmcgY29weSkKQEAgLTUwLDYgKzUwLDcg
QEAgUmVuZGVyU1ZHUmVzb3VyY2VDbGlwcGVyOjpSZW5kZXJTVkdSZXNvdQogCiBSZW5kZXJTVkdS
ZXNvdXJjZUNsaXBwZXI6On5SZW5kZXJTVkdSZXNvdXJjZUNsaXBwZXIoKQogeworICAgIGRlbGV0
ZUFsbFZhbHVlcyhtX2NsaXBwZXIpOwogICAgIG1fY2xpcHBlci5jbGVhcigpOwogfQogCkBAIC03
Niw3ICs3Nyw3IEBAIHZvaWQgUmVuZGVyU1ZHUmVzb3VyY2VDbGlwcGVyOjppbnZhbGlkYXQKICAg
ICBpZiAoIW1fY2xpcHBlci5jb250YWlucyhvYmplY3QpKQogICAgICAgICByZXR1cm47CiAKLSAg
ICBtX2NsaXBwZXIudGFrZShvYmplY3QpOworICAgIGRlbGV0ZSBtX2NsaXBwZXIudGFrZShvYmpl
Y3QpOwogfQogCiBib29sIFJlbmRlclNWR1Jlc291cmNlQ2xpcHBlcjo6YXBwbHlSZXNvdXJjZShS
ZW5kZXJPYmplY3QqIG9iamVjdCwgR3JhcGhpY3NDb250ZXh0KiBjb250ZXh0KQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>