RESOLVED FIXED Bug 37527
REGRESSION(r57511): many new graphics / svg related leaks
https://bugs.webkit.org/show_bug.cgi?id=37527
Summary REGRESSION(r57511): many new graphics / svg related leaks
Maciej Stachowiak
Reported 2010-04-13 15:44:39 PDT
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&) | -[NSRunLoop(NSRunLoop) runMode:beforeDate:] | CFRunLoopRunSpecific | __CFRunLoopRun | __CFRunLoopDoSources0 | MultiplexerSource::perform() | URLConnectionClient::processEvents() | URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) | URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, 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&) | WebCore::RenderLayer::paint(WebCore::GraphicsContext*, WebCore::IntRect const&, unsigned int, WebCore::RenderObject*) | WebCore::RenderLayer::paintLayer(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::IntRect const&, unsigned int, WebCore::RenderObject*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int) | WebCore::RenderLayer::paintLayer(WebCore::RenderLayer*, WebCore::GraphicsContext*, WebCore::IntRect const&, unsigned int, WebCore::RenderObject*, WTF::HashMap<WebCore::OverlapTestRequestClient*, WebCore::IntRect, WTF::PtrHash<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::OverlapTestRequestClient*>, WTF::HashTraits<WebCore::IntRect> >*, unsigned int) | WebCore::RenderSVGRoot::paint(WebCore::RenderObject::PaintInfo&, int, int) | WebCore::RenderBox::paint(WebCore::RenderObject::PaintInfo&, int, int) | WebCore::RenderSVGContainer::paint(WebCore::RenderObject::PaintInfo&, int, int) | WebCore::RenderSVGContainer::paint(WebCore::RenderObject::PaintInfo&, int, int) | WebCore::RenderPath::paint(WebCore::RenderObject::PaintInfo&, int, int) | WebCore::SVGRenderBase::prepareToRenderSVGContent(WebCore::RenderObject*, WebCore::RenderObject::PaintInfo&, WebCore::FloatRect const&, WebCore::SVGResourceFilter*&, WebCore::SVGResourceFilter*) | WebCore::RenderSVGResourceClipper::applyResource(WebCore::RenderObject*, WebCore::GraphicsContext*) | WebCore::RenderSVGResourceClipper::applyClippingToContext(WebCore::RenderObject*, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::GraphicsContext*) | WebCore::GraphicsContext::clipToImageBuffer(WebCore::FloatRect const&, WebCore::ImageBuffer const*) | WebCore::ImageBuffer::image() const | CGBitmapContextCreateImage | CGDataProviderCreateWithCopyOfData | malloc | malloc_zone_malloc Leak: 0x113206400 size=2048 zone: DefaultMallocZone_0x1051ed000 string ''
Attachments
Patch (1.49 KB, patch)
2010-04-13 22:58 PDT, Dirk Schulze
no flags
Maciej Stachowiak
Comment 1 2010-04-13 15:49:05 PDT
Shinichiro Hamaji
Comment 2 2010-04-13 16:00:14 PDT
It looks like we need to call delete values of m_clipper in ~RenderSVGResourceClipper(). Maybe we should call deleteAllValues(m_clipper) or invalidateClients().
Dirk Schulze
Comment 3 2010-04-13 22:58:13 PDT
Eric Seidel (no email)
Comment 4 2010-04-13 23:06:19 PDT
Comment on attachment 53320 [details] Patch Looks reasonable.
Dirk Schulze
Comment 5 2010-04-13 23:13:13 PDT
Comment on attachment 53320 [details] Patch Clearing flags on attachment: 53320 Committed r57564: <http://trac.webkit.org/changeset/57564>
Dirk Schulze
Comment 6 2010-04-13 23:13:22 PDT
All reviewed patches have been landed. Closing bug.
Nikolas Zimmermann
Comment 7 2010-04-14 00:10:15 PDT
Oops, /me hides in a dark corner. I could have sworn it said "delete m_clipper.take(..)" .... and the dtor, I just missed it. In fact it was in an earlier patch, that wasn't uploaded. Sorry for the trouble, glad that we have a leak bot!
Note You need to log in before you can comment on or make changes to this bug.