RESOLVED FIXED 118596
[ATK] Leak: Leak in WebKitAccessibleTextGetText
https://bugs.webkit.org/show_bug.cgi?id=118596
Summary [ATK] Leak: Leak in WebKitAccessibleTextGetText
Brian Holt
Reported 2013-07-12 04:56:36 PDT
Many leaks found in tesktak using valgrind (this is one example): ==32735== 65 bytes in 1 blocks are definitely lost in loss record 8,278 of 12,167 ==32735== at 0x4C2B3F8: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==32735== by 0xA40AD10: g_malloc (gmem.c:159) ==32735== by 0xA42173B: g_strdup (gstrfuncs.c:364) ==32735== by 0x6713A39: _ZL27webkitAccessibleTextGetTextP8_AtkTextii (WebKitAccessibleInterfaceText.cpp:594) ==32735== by 0x6711EA5: _ZL21getGailTextUtilForAtkP8_AtkText (WebKitAccessibleInterfaceText.cpp:171) ==32735== by 0x6713CF6: _ZL36webkitAccessibleTextGetTextForOffsetP8_AtkTexti15AtkTextBoundary23GetTextRelativePositionPiS3_ (WebKitAccessibleInterfaceText.cpp:659) ==32735== by 0x6713DA3: _ZL35webkitAccessibleTextGetTextAtOffsetP8_AtkTexti15AtkTextBoundaryPiS2_ (WebKitAccessibleInterfaceText.cpp:673) ==32735== by 0x9F5FBD9: atk_text_get_text_at_offset (atktext.c:458) ==32735== by 0x402985: testGetTextFunction (testatk.c:102) ==32735== by 0x402E43: runGetTextTests (testatk.c:166) ==32735== by 0x408F03: testWebkitAtkGetTextAtOffset (testatk.c:776) ==32735== by 0xA427B1C: g_test_run_suite_internal (gtestutils.c:1714) ==32735== by 0xA427C95: g_test_run_suite_internal (gtestutils.c:1778) ==32735== by 0xA427C95: g_test_run_suite_internal (gtestutils.c:1778) ==32735== by 0xA427FF2: g_test_run_suite (gtestutils.c:1823) ==32735== by 0x4145AB: main (testatk.c:2115) ==32735== { <insert_a_suppression_name_here> Memcheck:Leak fun:malloc fun:g_malloc fun:g_strdup fun:_ZL27webkitAccessibleTextGetTextP8_AtkTextii fun:_ZL21getGailTextUtilForAtkP8_AtkText fun:_ZL36webkitAccessibleTextGetTextForOffsetP8_AtkTexti15AtkTextBoundary23GetTextRelativePositionPiS3_ fun:_ZL35webkitAccessibleTextGetTextAtOffsetP8_AtkTexti15AtkTextBoundaryPiS2_ fun:atk_text_get_text_at_offset fun:testGetTextFunction fun:runGetTextTests fun:testWebkitAtkGetTextAtOffset fun:g_test_run_suite_internal fun:g_test_run_suite_internal fun:g_test_run_suite_internal fun:g_test_run_suite fun:main }
Attachments
Patch (1.61 KB, patch)
2013-07-12 06:38 PDT, Brian Holt
no flags
Radar WebKit Bug Importer
Comment 1 2013-07-12 04:57:01 PDT
Brian Holt
Comment 2 2013-07-12 06:38:28 PDT
Mario Sanchez Prada
Comment 3 2013-07-15 02:06:18 PDT
Comment on attachment 206537 [details] Patch gail_util_text_setup() accepts a const gchar* and webkitAccessibleTextGetText() returns newly allocated memory, so this is a absolutely right. Thanks for the patch!
Carlos Garcia Campos
Comment 4 2013-07-15 05:52:23 PDT
Comment on attachment 206537 [details] Patch Correct, it seems there's a similar leak in textExtents.
Brian Holt
Comment 5 2013-07-15 06:07:02 PDT
(In reply to comment #4) > (From update of attachment 206537 [details]) > Correct, it seems there's a similar leak in textExtents. It looks like that was fixed in https://bugs.webkit.org/show_bug.cgi?id=118248. Not sure why I missed the leak in addressed in this bug when I was working on that one!
WebKit Commit Bot
Comment 6 2013-07-15 06:24:06 PDT
Comment on attachment 206537 [details] Patch Clearing flags on attachment: 206537 Committed r152631: <http://trac.webkit.org/changeset/152631>
WebKit Commit Bot
Comment 7 2013-07-15 06:24:09 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.