RESOLVED FIXED 118362
[ATK] Leak: more leaks in AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=118362
Summary [ATK] Leak: more leaks in AccessibilityUIElement
Brian Holt
Reported 2013-07-03 10:15:26 PDT
In Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp: Leaks found using the "--leak" option in the Gtk port: { <insert_a_suppression_name_here> Memcheck:Leak fun:malloc fun:__vasprintf_chk fun:g_vasprintf fun:g_strdup_vprintf fun:g_strdup_printf fun:_ZN22AccessibilityUIElement8languageEv fun:_ZL19getLanguageCallbackPK15OpaqueJSContextP13OpaqueJSValueP14OpaqueJSStringPPKS2_ fun:_ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE14getStaticValueEPNS_9ExecStateENS_12PropertyNameE fun:_ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE18getOwnPropertySlotEPNS_6JSCellEPNS_9ExecStateENS_12PropertyNameERNS_12PropertySlotE fun:llint_slow_path_get_by_id obj:/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libjavascriptcoregtk-3.0.so.0.14.1 fun:_ZN3JSC11Interpreter7executeEPNS_17ProgramExecutableEPNS_9ExecStateEPNS_8JSObjectE fun:_ZN3JSC8evaluateEPNS_9ExecStateERKNS_10SourceCodeENS_7JSValueEPS5_ fun:_ZN7WebCore16ScriptController15evaluateInWorldERKNS_16ScriptSourceCodeEPNS_15DOMWrapperWorldE fun:_ZN7WebCore16ScriptController8evaluateERKNS_16ScriptSourceCodeE fun:_ZN7WebCore13ScriptElement13executeScriptERKNS_16ScriptSourceCodeE fun:_ZN7WebCore13ScriptElement13prepareScriptERKN3WTF12TextPositionENS0_17LegacyTypeSupportE fun:_ZN7WebCore16HTMLScriptRunner9runScriptEPNS_7ElementERKN3WTF12TextPositionE fun:_ZN7WebCore16HTMLScriptRunner7executeEN3WTF10PassRefPtrINS_7ElementEEERKNS1_12TextPositionE fun:_ZN7WebCore18HTMLDocumentParser30runScriptsForPausedTreeBuilderEv fun:_ZN7WebCore18HTMLDocumentParser16canTakeNextTokenENS0_15SynchronousModeERNS_11PumpSessionE fun:_ZN7WebCore18HTMLDocumentParser13pumpTokenizerENS0_15SynchronousModeE } { <insert_a_suppression_name_here> Memcheck:Leak fun:malloc fun:g_malloc fun:g_strdup fun:_ZL27webkitAccessibleTextGetTextP8_AtkTextii fun:_ZL23webkitAccessibleGetNameP10_AtkObject fun:_ZN22AccessibilityUIElement5titleEv fun:_ZL16getTitleCallbackPK15OpaqueJSContextP13OpaqueJSValueP14OpaqueJSStringPPKS2_ fun:_ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE14getStaticValueEPNS_9ExecStateENS_12PropertyNameE fun:_ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE18getOwnPropertySlotEPNS_6JSCellEPNS_9ExecStateENS_12PropertyNameERNS_12PropertySlotE fun:llint_slow_path_get_by_id obj:/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libjavascriptcoregtk-3.0.so.0.14.1 fun:_ZN3JSC11Interpreter7executeEPNS_14EvalExecutableEPNS_9ExecStateENS_7JSValueEPNS_7JSScopeE fun:_ZN3JSC4evalEPNS_9ExecStateE fun:llint_slow_path_call_eval obj:/home/likewise-open/SERILOCAL/brian.holt/Code/gnome3/WebKit/WebKitBuild/Release/.libs/libjavascriptcoregtk-3.0.so.0.14.1 fun:_ZN3JSC11Interpreter7executeEPNS_17ProgramExecutableEPNS_9ExecStateEPNS_8JSObjectE fun:_ZN3JSC8evaluateEPNS_9ExecStateERKNS_10SourceCodeENS_7JSValueEPS5_ fun:_ZN7WebCore16ScriptController15evaluateInWorldERKNS_16ScriptSourceCodeEPNS_15DOMWrapperWorldE fun:_ZN7WebCore16ScriptController8evaluateERKNS_16ScriptSourceCodeE fun:_ZN7WebCore13ScriptElement13executeScriptERKNS_16ScriptSourceCodeE fun:_ZN7WebCore13ScriptElement13prepareScriptERKN3WTF12TextPositionENS0_17LegacyTypeSupportE fun:_ZN7WebCore16HTMLScriptRunner9runScriptEPNS_7ElementERKN3WTF12TextPositionE }
Attachments
Patch (2.37 KB, patch)
2013-07-03 10:51 PDT, Brian Holt
no flags
Patch (2.37 KB, patch)
2013-07-03 11:03 PDT, Brian Holt
no flags
Brian Holt
Comment 1 2013-07-03 10:51:08 PDT
EFL EWS Bot
Comment 2 2013-07-03 10:54:35 PDT
Brian Holt
Comment 3 2013-07-03 10:55:11 PDT
The title one is a bit trickier because fun:g_strdup fun:_ZL27webkitAccessibleTextGetTextP8_AtkTextii fun:_ZL23webkitAccessibleGetNameP10_AtkObject fun:_ZN22AccessibilityUIElement5titleEv webkitAccessibleGetName(AtkObject*) sometimes returns a char* that is created by g_strdup but it also sometimes returns a value stored in a cache. Freeing that would be a disaster. My feeling at this stage is that the effort required to refactor is not worth the few bytes leaking.
EFL EWS Bot
Comment 4 2013-07-03 10:56:47 PDT
kov's GTK+ EWS bot
Comment 5 2013-07-03 10:57:32 PDT
Chris Dumez
Comment 6 2013-07-03 10:59:14 PDT
Comment on attachment 206012 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=206012&action=review > Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:439 > + GOwnPtr<char> axValue(g_strdup_printf("AXLanguage: %s", locale)) missing ; > Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:625 > + GOwnPtr<char> axValue(g_strdup_printf("AXLanguage: %s", locale)) ditto.
Brian Holt
Comment 7 2013-07-03 11:03:45 PDT
Chris Dumez
Comment 8 2013-07-03 11:06:15 PDT
Comment on attachment 206013 [details] Patch Ok, r=me. Do you want me to commit? You did not set the cq flag.
Brian Holt
Comment 9 2013-07-03 11:08:01 PDT
(In reply to comment #8) > (From update of attachment 206013 [details]) > Ok, r=me. Do you want me to commit? You did not set the cq flag. Yes please, I forgot to do that with webkit-patch.
WebKit Commit Bot
Comment 10 2013-07-03 11:51:08 PDT
Comment on attachment 206013 [details] Patch Clearing flags on attachment: 206013 Committed r152371: <http://trac.webkit.org/changeset/152371>
WebKit Commit Bot
Comment 11 2013-07-03 11:51:10 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.