Bug 118382

Summary: Leak: WebkitAccessible* from webkitAccessibleNew is not freed
Product: WebKit Reporter: Brian Holt <brian.holt>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED ---    
Severity: Normal CC: cdumez, mario
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 116317    

Description Brian Holt 2013-07-04 01:28:30 PDT
In Source/WebCore/accessibility/atk/WebkitAccessibleWrapperAtk.cpp:

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

Command: /home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/Programs/DumpRenderTree -
Leak_DefinitelyLost
1,000 (504 direct, 496 indirect) bytes in 3 blocks are definitely lost in loss record 626 of 783
    malloc (/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    g_malloc (/WebKitBuild/Dependencies/Source/glib-2.36.0/glib/gmem.c:159)
    g_slice_alloc (/WebKitBuild/Dependencies/Source/glib-2.36.0/glib/gslice.c:1003)
    g_slice_alloc0 (/WebKitBuild/Dependencies/Source/glib-2.36.0/glib/gslice.c:1029)
    g_type_create_instance (/WebKitBuild/Dependencies/Source/glib-2.36.0/gobject/gtype.c:1892)
    g_object_constructor (/WebKitBuild/Dependencies/Source/glib-2.36.0/gobject/gobject.c:1855)
    g_object_newv (/WebKitBuild/Dependencies/Source/glib-2.36.0/gobject/gobject.c:1638)
    g_object_new (/WebKitBuild/Dependencies/Source/glib-2.36.0/gobject/gobject.c:1548)
    webkitAccessibleNew (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    WebCore::AXObjectCache::attachWrapper(WebCore::AccessibilityObject*) (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    WebCore::AXObjectCache::getOrCreate(WebCore::RenderObject*) (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    WebCore::AccessibilityRenderObject::addChildren() (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    WebCore::AccessibilityObject::children() (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    WebCore::AccessibilityNodeObject::insertChild(WebCore::AccessibilityObject*, unsigned int) (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    WebCore::AccessibilityRenderObject::addChildren() (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    WebCore::AccessibilityObject::children() (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    WebCore::AccessibilityNodeObject::insertChild(WebCore::AccessibilityObject*, unsigned int) (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    WebCore::AccessibilityRenderObject::addChildren() (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    WebCore::AccessibilityObject::children() (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    WebCore::AccessibilityNodeObject::insertChild(WebCore::AccessibilityObject*, unsigned int) (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    WebCore::AccessibilityRenderObject::addChildren() (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    WebCore::AccessibilityObject::children() (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    webkitAccessibleGetNChildren(_AtkObject*) (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libwebkitgtk-3.0.so.0.19.1)
    getChildrenCountCallback(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const**) (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/Programs/DumpRenderTree)
    JSC::JSCallbackObject<JSC::JSDestructibleObject>::getStaticValue(JSC::ExecState*, JSC::PropertyName) (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libjavascriptcoregtk-3.0.so.0.14.1)
    JSC::JSCallbackObject<JSC::JSDestructibleObject>::getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&) (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libjavascriptcoregtk-3.0.so.0.14.1)
    llint_slow_path_get_by_id (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libjavascriptcoregtk-3.0.so.0.14.1)
    0x51256F4 (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libjavascriptcoregtk-3.0.so.0.14.1)
    JSC::Interpreter::execute(JSC::ProgramExecutable*, JSC::ExecState*, JSC::JSObject*) (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libjavascriptcoregtk-3.0.so.0.14.1)
    JSC::evaluate(JSC::ExecState*, JSC::SourceCode const&, JSC::JSValue, JSC::JSValue*) (/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libjavascriptcoregtk-3.0.so.0.14.1)
Suppression (error hash=#F22B951E9D5554F4#):
  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:g_malloc
   fun:g_slice_alloc
   fun:g_slice_alloc0
   fun:g_type_create_instance
   fun:g_object_constructor
   fun:g_object_newv
   fun:g_object_new
   fun:webkitAccessibleNew
   fun:_ZN7WebCore13AXObjectCache13attachWrapperEPNS_19AccessibilityObjectE
   fun:_ZN7WebCore13AXObjectCache11getOrCreateEPNS_12RenderObjectE
   fun:_ZN7WebCore25AccessibilityRenderObject11addChildrenEv
   fun:_ZN7WebCore19AccessibilityObject8childrenEv
   fun:_ZN7WebCore23AccessibilityNodeObject11insertChildEPNS_19AccessibilityObjectEj
   fun:_ZN7WebCore25AccessibilityRenderObject11addChildrenEv
   fun:_ZN7WebCore19AccessibilityObject8childrenEv
   fun:_ZN7WebCore23AccessibilityNodeObject11insertChildEPNS_19AccessibilityObjectEj
   fun:_ZN7WebCore25AccessibilityRenderObject11addChildrenEv
   fun:_ZN7WebCore19AccessibilityObject8childrenEv
   fun:_ZN7WebCore23AccessibilityNodeObject11insertChildEPNS_19AccessibilityObjectEj
   fun:_ZN7WebCore25AccessibilityRenderObject11addChildrenEv
   fun:_ZN7WebCore19AccessibilityObject8childrenEv
}