RESOLVED FIXED Bug 94627
[GTK] [WK2] Memory leaks in TestWebKitFindController
https://bugs.webkit.org/show_bug.cgi?id=94627
Summary [GTK] [WK2] Memory leaks in TestWebKitFindController
Sudarsana Nagineni (babu)
Reported 2012-08-21 13:07:03 PDT
To avoid these leaks, adoptGRef must be used instead of just getting new reference of pixbuf. ==17717== 120,080 (80 direct, 120,000 indirect) bytes in 1 blocks are definitely lost in loss record 6,458 of 6,460 ==17717== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==17717== by 0xA6E7A38: g_malloc (gmem.c:159) ==17717== by 0xA6FAC62: g_slice_alloc (gslice.c:1003) ==17717== by 0xA6FB1A5: g_slice_alloc0 (gslice.c:1029) ==17717== by 0xA47B8B9: g_type_create_instance (gtype.c:1872) ==17717== by 0xA4600B8: g_object_constructor (gobject.c:1849) ==17717== by 0xA4616E3: g_object_newv (gobject.c:1713) ==17717== by 0xA461EC5: g_object_new_valist (gobject.c:1830) ==17717== by 0xA4621D3: g_object_new (gobject.c:1545) ==17717== by 0xA232E2E: gdk_pixbuf_new_from_data (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.2600.1) ==17717== by 0xA230F9D: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.2600.1) ==17717== by 0x9FD3FD3: gdk_pixbuf_get_from_surface (gdkpixbuf-drawable.c:246) ==17717== by 0x9FD4319: gdk_pixbuf_get_from_window (gdkpixbuf-drawable.c:97) ==17717== by 0x40B47D: testFindControllerHide(FindControllerTest*, void const*) (TestWebKitFindController.cpp:315) ==17717== by 0xA70264A: g_test_run_suite_internal (gtestutils.c:1663) ==17717== by 0xA7027C5: g_test_run_suite_internal (gtestutils.c:1727) ==17717== by 0xA7027C5: g_test_run_suite_internal (gtestutils.c:1727) ==17717== by 0xA702B1A: g_test_run_suite (gtestutils.c:1772) ==17717== by 0x40DD29: main (TestMain.cpp:35) ==17717== ==17717== 120,080 (80 direct, 120,000 indirect) bytes in 1 blocks are definitely lost in loss record 6,459 of 6,460 ==17717== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==17717== by 0xA6E7A38: g_malloc (gmem.c:159) ==17717== by 0xA6FAC62: g_slice_alloc (gslice.c:1003) ==17717== by 0xA6FB1A5: g_slice_alloc0 (gslice.c:1029) ==17717== by 0xA47B8B9: g_type_create_instance (gtype.c:1872) ==17717== by 0xA4600B8: g_object_constructor (gobject.c:1849) ==17717== by 0xA4616E3: g_object_newv (gobject.c:1713) ==17717== by 0xA461EC5: g_object_new_valist (gobject.c:1830) ==17717== by 0xA4621D3: g_object_new (gobject.c:1545) ==17717== by 0xA232E2E: gdk_pixbuf_new_from_data (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.2600.1) ==17717== by 0xA230F9D: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.2600.1) ==17717== by 0x9FD3FD3: gdk_pixbuf_get_from_surface (gdkpixbuf-drawable.c:246) ==17717== by 0x9FD4319: gdk_pixbuf_get_from_window (gdkpixbuf-drawable.c:97) ==17717== by 0x40B547: testFindControllerHide(FindControllerTest*, void const*) (TestWebKitFindController.cpp:323) ==17717== by 0xA70264A: g_test_run_suite_internal (gtestutils.c:1663) ==17717== by 0xA7027C5: g_test_run_suite_internal (gtestutils.c:1727) ==17717== by 0xA7027C5: g_test_run_suite_internal (gtestutils.c:1727) ==17717== by 0xA702B1A: g_test_run_suite (gtestutils.c:1772) ==17717== by 0x40DD29: main (TestMain.cpp:35) ==17717== ==17717== 120,080 (80 direct, 120,000 indirect) bytes in 1 blocks are definitely lost in loss record 6,460 of 6,460 ==17717== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==17717== by 0xA6E7A38: g_malloc (gmem.c:159) ==17717== by 0xA6FAC62: g_slice_alloc (gslice.c:1003) ==17717== by 0xA6FB1A5: g_slice_alloc0 (gslice.c:1029) ==17717== by 0xA47B8B9: g_type_create_instance (gtype.c:1872) ==17717== by 0xA4600B8: g_object_constructor (gobject.c:1849) ==17717== by 0xA4616E3: g_object_newv (gobject.c:1713) ==17717== by 0xA461EC5: g_object_new_valist (gobject.c:1830) ==17717== by 0xA4621D3: g_object_new (gobject.c:1545) ==17717== by 0xA232E2E: gdk_pixbuf_new_from_data (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.2600.1) ==17717== by 0xA230F9D: gdk_pixbuf_new (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.2600.1) ==17717== by 0x9FD3FD3: gdk_pixbuf_get_from_surface (gdkpixbuf-drawable.c:246) ==17717== by 0x9FD4319: gdk_pixbuf_get_from_window (gdkpixbuf-drawable.c:97) ==17717== by 0x40B63F: testFindControllerHide(FindControllerTest*, void const*) (TestWebKitFindController.cpp:332) ==17717== by 0xA70264A: g_test_run_suite_internal (gtestutils.c:1663) ==17717== by 0xA7027C5: g_test_run_suite_internal (gtestutils.c:1727) ==17717== by 0xA7027C5: g_test_run_suite_internal (gtestutils.c:1727) ==17717== by 0xA702B1A: g_test_run_suite (gtestutils.c:1772) ==17717== by 0x40DD29: main (TestMain.cpp:35)
Attachments
Patch (2.74 KB, patch)
2012-08-21 13:25 PDT, Sudarsana Nagineni (babu)
no flags
Sudarsana Nagineni (babu)
Comment 1 2012-08-21 13:25:42 PDT
Created attachment 159755 [details] Patch Add missing adoptGRef to avoid memory leaks.
WebKit Review Bot
Comment 2 2012-08-21 13:28:27 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
WebKit Review Bot
Comment 3 2012-08-21 17:18:16 PDT
Comment on attachment 159755 [details] Patch Clearing flags on attachment: 159755 Committed r126231: <http://trac.webkit.org/changeset/126231>
WebKit Review Bot
Comment 4 2012-08-21 17:18:19 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.