Bug 118528 - Leak: TestNetscapePlugin leaks a PluginObject
Summary: Leak: TestNetscapePlugin leaks a PluginObject
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 116317
  Show dependency treegraph
 
Reported: 2013-07-10 03:26 PDT by Brian Holt
Modified: 2013-07-11 01:51 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Holt 2013-07-10 03:26:55 PDT
In Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp:179

Leak found using the "--leak" option in the Gtk port:

Command: /home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Debug/Programs/DumpRenderTree -
Leak_DefinitelyLost
1,392 (1,248 direct, 144 indirect) bytes in 6 blocks are definitely lost in loss record 13,958 of 14,479
    malloc (/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    pluginAllocate(_NPP*, NPClass*) (/WebKitBuild/Debug/../../Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:1176)
    _NPN_CreateObject (/WebKitBuild/Debug/../../Source/WebCore/bridge/npruntime.cpp:119)
    NPP_New (/WebKitBuild/Debug/../../Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp:179)
    WebCore::PluginView::start() (/WebKitBuild/Debug/../../Source/WebCore/plugins/PluginView.cpp:251)
    WebCore::PluginView::startOrAddToUnstartedList() (/WebKitBuild/Debug/../../Source/WebCore/plugins/PluginView.cpp:231)
    WebCore::PluginView::init() (/WebKitBuild/Debug/../../Source/WebCore/plugins/PluginView.cpp:209)
    WebCore::PluginView::setParent(WebCore::ScrollView*) (/WebKitBuild/Debug/../../Source/WebCore/plugins/gtk/PluginViewGtk.cpp:468)
    WebCore::ScrollView::addChild(WTF::PassRefPtr<WebCore::Widget>) (/WebKitBuild/Debug/../../Source/WebCore/platform/ScrollView.cpp:72)
    WebCore::moveWidgetToParentSoon(WebCore::Widget*, WebCore::FrameView*) (/WebKitBuild/Debug/../../Source/WebCore/rendering/RenderWidget.cpp:81)
    WebCore::RenderWidget::setWidget(WTF::PassRefPtr<WebCore::Widget>) (/WebKitBuild/Debug/../../Source/WebCore/rendering/RenderWidget.cpp:213)
    WebCore::RenderPart::setWidget(WTF::PassRefPtr<WebCore::Widget>) (/WebKitBuild/Debug/../../Source/WebCore/rendering/RenderPart.cpp:57)
    WebCore::SubframeLoader::loadPlugin(WebCore::HTMLPlugInImageElement*, WebCore::KURL const&, WTF::String const&, WTF::Vector<WTF::String, 0ul, WTF::CrashOnOverflow> const&, WTF::Vector<WTF::String, 0ul, WTF::CrashOnOverflow> const&, bool) (/WebKitBuild/Debug/../../Source/WebCore/loader/SubframeLoader.cpp:465)
    WebCore::SubframeLoader::requestPlugin(WebCore::HTMLPlugInImageElement*, WebCore::KURL const&, WTF::String const&, WTF::Vector<WTF::String, 0ul, WTF::CrashOnOverflow> const&, WTF::Vector<WTF::String, 0ul, WTF::CrashOnOverflow> const&, bool) (/WebKitBuild/Debug/../../Source/WebCore/loader/SubframeLoader.cpp:160)
    WebCore::SubframeLoader::requestObject(WebCore::HTMLPlugInImageElement*, WTF::String const&, WTF::AtomicString const&, WTF::String const&, WTF::Vector<WTF::String, 0ul, WTF::CrashOnOverflow> const&, WTF::Vector<WTF::String, 0ul, WTF::CrashOnOverflow> const&) (/WebKitBuild/Debug/../../Source/WebCore/loader/SubframeLoader.cpp:235)
    WebCore::HTMLEmbedElement::updateWidget(WebCore::PluginCreationOption) (/WebKitBuild/Debug/../../Source/WebCore/html/HTMLEmbedElement.cpp:170)
    WebCore::FrameView::updateWidget(WebCore::RenderObject*) (/WebKitBuild/Debug/../../Source/WebCore/page/FrameView.cpp:2695)
    WebCore::FrameView::updateWidgets() (/WebKitBuild/Debug/../../Source/WebCore/page/FrameView.cpp:2735)
    WebCore::FrameView::performPostLayoutTasks() (/WebKitBuild/Debug/../../Source/WebCore/page/FrameView.cpp:2810)
    WebCore::FrameView::layout(bool) (/WebKitBuild/Debug/../../Source/WebCore/page/FrameView.cpp:1387)
    WebCore::Document::implicitClose() (/WebKitBuild/Debug/../../Source/WebCore/dom/Document.cpp:2454)
    WebCore::FrameLoader::checkCallImplicitClose() (/WebKitBuild/Debug/../../Source/WebCore/loader/FrameLoader.cpp:843)
    WebCore::FrameLoader::checkCompleted() (/WebKitBuild/Debug/../../Source/WebCore/loader/FrameLoader.cpp:786)
    WebCore::FrameLoader::finishedParsing() (/WebKitBuild/Debug/../../Source/WebCore/loader/FrameLoader.cpp:719)
    WebCore::Document::finishedParsing() (/WebKitBuild/Debug/../../Source/WebCore/dom/Document.cpp:4417)
    WebCore::HTMLConstructionSite::finishedParsing() (/WebKitBuild/Debug/../../Source/WebCore/html/parser/HTMLConstructionSite.cpp:348)
    WebCore::HTMLTreeBuilder::finished() (/WebKitBuild/Debug/../../Source/WebCore/html/parser/HTMLTreeBuilder.cpp:2926)
    WebCore::HTMLDocumentParser::end() (/WebKitBuild/Debug/../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:756)
    WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd() (/WebKitBuild/Debug/../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:767)
    WebCore::HTMLDocumentParser::prepareToStopParsing() (/WebKitBuild/Debug/../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:211)
    WebCore::HTMLDocumentParser::attemptToEnd() (/WebKitBuild/Debug/../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:779)
    WebCore::HTMLDocumentParser::finish() (/WebKitBuild/Debug/../../Source/WebCore/html/parser/HTMLDocumentParser.cpp:828)
    WebCore::DocumentWriter::end() (/WebKitBuild/Debug/../../Source/WebCore/loader/DocumentWriter.cpp:248)
    WebCore::DocumentLoader::finishedLoading(double) (/WebKitBuild/Debug/../../Source/WebCore/loader/DocumentLoader.cpp:402)
    WebCore::DocumentLoader::notifyFinished(WebCore::CachedResource*) (/WebKitBuild/Debug/../../Source/WebCore/loader/DocumentLoader.cpp:344)
    WebCore::CachedResource::checkNotify() (/WebKitBuild/Debug/../../Source/WebCore/loader/cache/CachedResource.cpp:369)
    WebCore::CachedResource::finishLoading(WebCore::ResourceBuffer*) (/WebKitBuild/Debug/../../Source/WebCore/loader/cache/CachedResource.cpp:385)
    WebCore::CachedRawResource::finishLoading(WebCore::ResourceBuffer*) (/WebKitBuild/Debug/../../Source/WebCore/loader/cache/CachedRawResource.cpp:94)
    WebCore::SubresourceLoader::didFinishLoading(double) (/WebKitBuild/Debug/../../Source/WebCore/loader/SubresourceLoader.cpp:282)
    WebCore::ResourceLoader::didFinishLoading(WebCore::ResourceHandle*, double) (/WebKitBuild/Debug/../../Source/WebCore/loader/ResourceLoader.cpp:488)
Suppression (error hash=#E34B092E3A2A2786#):
  For more info on using suppressions see http://dev.chromium.org/developers/tree-sheriffs/sheriff-details-chromium/memory-sheriff#TOC-Suppressing-memory-reports
{
   <insert_a_suppression_name_here>
   Memcheck:Leak
   fun:malloc
   fun:_ZL14pluginAllocateP4_NPPP7NPClass
   fun:_NPN_CreateObject
   fun:NPP_New
   fun:_ZN7WebCore10PluginView5startEv
   fun:_ZN7WebCore10PluginView25startOrAddToUnstartedListEv
   fun:_ZN7WebCore10PluginView4initEv
   fun:_ZN7WebCore10PluginView9setParentEPNS_10ScrollViewE
   fun:_ZN7WebCore10ScrollView8addChildEN3WTF10PassRefPtrINS_6WidgetEEE
   fun:_ZN7WebCoreL22moveWidgetToParentSoonEPNS_6WidgetEPNS_9FrameViewE
   fun:_ZN7WebCore12RenderWidget9setWidgetEN3WTF10PassRefPtrINS_6WidgetEEE
   fun:_ZN7WebCore10RenderPart9setWidgetEN3WTF10PassRefPtrINS_6WidgetEEE
   fun:_ZN7WebCore14SubframeLoader10loadPluginEPNS_22HTMLPlugInImageElementERKNS_4KURLERKN3WTF6StringERKNS6_6VectorIS7_Lm0ENS6_15CrashOnOverflowEEESE_b
   fun:_ZN7WebCore14SubframeLoader13requestPluginEPNS_22HTMLPlugInImageElementERKNS_4KURLERKN3WTF6StringERKNS6_6VectorIS7_Lm0ENS6_15CrashOnOverflowEEESE_b
   fun:_ZN7WebCore14SubframeLoader13requestObjectEPNS_22HTMLPlugInImageElementERKN3WTF6StringERKNS3_12AtomicStringES6_RKNS3_6VectorIS4_Lm0ENS3_15CrashOnOverflowEEESE_
   fun:_ZN7WebCore16HTMLEmbedElement12updateWidgetENS_20PluginCreationOptionE
   fun:_ZN7WebCore9FrameView12updateWidgetEPNS_12RenderObjectE
   fun:_ZN7WebCore9FrameView13updateWidgetsEv
   fun:_ZN7WebCore9FrameView22performPostLayoutTasksEv
   fun:_ZN7WebCore9FrameView6layoutEb
   fun:_ZN7WebCore8Document13implicitCloseEv
   fun:_ZN7WebCore11FrameLoader22checkCallImplicitCloseEv
}
Comment 1 Brian Holt 2013-07-11 01:51:54 PDT
It looks like WebCore::PluginView::stop() and then NPP_Destroy() is not called in certain circumstances, like LayoutTests/plugins/return-negative-one-from-write.html.