Bug 97111 - [WTR] Memory leaks in TestRunner::deliverWebIntent()
Summary: [WTR] Memory leaks in TestRunner::deliverWebIntent()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sudarsana Nagineni (babu)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-19 07:22 PDT by Sudarsana Nagineni (babu)
Modified: 2012-09-19 10:57 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.79 KB, patch)
2012-09-19 07:47 PDT, Sudarsana Nagineni (babu)
no flags Details | Formatted Diff | Diff
Patch (4.79 KB, patch)
2012-09-19 08:34 PDT, Sudarsana Nagineni (babu)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sudarsana Nagineni (babu) 2012-09-19 07:22:11 PDT
Valgrind reports the following memory leaks in Web intents testing code.

==22718== 68 (24 direct, 44 indirect) bytes in 1 blocks are definitely lost in loss record 4,193 of 5,550
==22718==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22718==    by 0x9011AFE: WTF::fastMalloc(unsigned long) (FastMalloc.cpp:268)
==22718==    by 0x52E8DDA: WTF::ThreadSafeRefCountedBase::operator new(unsigned long) (ThreadSafeRefCounted.h:72)
==22718==    by 0x5334315: WebKit::WebString::createFromUTF8String(char const*) (WebString.h:60)
==22718==    by 0x5333F15: WKStringCreateWithUTF8CString (WKString.cpp:41)
==22718==    by 0x1887A707: WTR::TestRunner::deliverWebIntent(OpaqueJSString*, OpaqueJSString*, OpaqueJSString*) (TestRunner.cpp:694)
==22718==    by 0x1888A88F: WTR::JSTestRunner::deliverWebIntent(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) (JSTestRunner.cpp:1124)

==22718== 64 (24 direct, 40 indirect) bytes in 1 blocks are definitely lost in loss record 4,184 of 5,550
==22718==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22718==    by 0x9011AFE: WTF::fastMalloc(unsigned long) (FastMalloc.cpp:268)
==22718==    by 0x52E8DDA: WTF::ThreadSafeRefCountedBase::operator new(unsigned long) (ThreadSafeRefCounted.h:72)
==22718==    by 0x5334315: WebKit::WebString::createFromUTF8String(char const*) (WebString.h:60)
==22718==    by 0x5333F15: WKStringCreateWithUTF8CString (WKString.cpp:41)
==22718==    by 0x1887A73F: WTR::TestRunner::deliverWebIntent(OpaqueJSString*, OpaqueJSString*, OpaqueJSString*) (TestRunner.cpp:695)
==22718==    by 0x1888A88F: WTR::JSTestRunner::deliverWebIntent(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) (JSTestRunner.cpp:1124)

==22718== 
==22718== 64 (24 direct, 40 indirect) bytes in 1 blocks are definitely lost in loss record 4,185 of 5,550
==22718==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22718==    by 0x9011AFE: WTF::fastMalloc(unsigned long) (FastMalloc.cpp:268)
==22718==    by 0x52E8DDA: WTF::ThreadSafeRefCountedBase::operator new(unsigned long) (ThreadSafeRefCounted.h:72)
==22718==    by 0x5334315: WebKit::WebString::createFromUTF8String(char const*) (WebString.h:60)
==22718==    by 0x5333F15: WKStringCreateWithUTF8CString (WKString.cpp:41)
==22718==    by 0x1887A777: WTR::TestRunner::deliverWebIntent(OpaqueJSString*, OpaqueJSString*, OpaqueJSString*) (TestRunner.cpp:696)
==22718==    by 0x1888A88F: WTR::JSTestRunner::deliverWebIntent(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) (JSTestRunner.cpp:1124)


==22718== 68 (24 direct, 44 indirect) bytes in 1 blocks are definitely lost in loss record 4,194 of 5,550
==22718==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22718==    by 0x9011AFE: WTF::fastMalloc(unsigned long) (FastMalloc.cpp:268)
==22718==    by 0x52E8DDA: WTF::ThreadSafeRefCountedBase::operator new(unsigned long) (ThreadSafeRefCounted.h:72)
==22718==    by 0x5334315: WebKit::WebString::createFromUTF8String(char const*) (WebString.h:60)
==22718==    by 0x5333F15: WKStringCreateWithUTF8CString (WKString.cpp:41)
==22718==    by 0x541C904: WKBundleIntentCreate (WKBundleIntent.cpp:55)
==22718==    by 0x1887A7A8: WTR::TestRunner::deliverWebIntent(OpaqueJSString*, OpaqueJSString*, OpaqueJSString*) (TestRunner.cpp:698)
==22718==    by 0x1888A88F: WTR::JSTestRunner::deliverWebIntent(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) (JSTestRunner.cpp:1124)


==22718== 
==22718== 64 (24 direct, 40 indirect) bytes in 1 blocks are definitely lost in loss record 4,186 of 5,550
==22718==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22718==    by 0x9011AFE: WTF::fastMalloc(unsigned long) (FastMalloc.cpp:268)
==22718==    by 0x52E8DDA: WTF::ThreadSafeRefCountedBase::operator new(unsigned long) (ThreadSafeRefCounted.h:72)
==22718==    by 0x5334315: WebKit::WebString::createFromUTF8String(char const*) (WebString.h:60)
==22718==    by 0x5333F15: WKStringCreateWithUTF8CString (WKString.cpp:41)
==22718==    by 0x541C96B: WKBundleIntentCreate (WKBundleIntent.cpp:57)
==22718==    by 0x1887A7A8: WTR::TestRunner::deliverWebIntent(OpaqueJSString*, OpaqueJSString*, OpaqueJSString*) (TestRunner.cpp:698)
==22718==    by 0x1888A88F: WTR::JSTestRunner::deliverWebIntent(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) (JSTestRunner.cpp:1124)


==22718== 64 (24 direct, 40 indirect) bytes in 1 blocks are definitely lost in loss record 4,187 of 5,550
==22718==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22718==    by 0x9011AFE: WTF::fastMalloc(unsigned long) (FastMalloc.cpp:268)
==22718==    by 0x52E8DDA: WTF::ThreadSafeRefCountedBase::operator new(unsigned long) (ThreadSafeRefCounted.h:72)
==22718==    by 0x5334315: WebKit::WebString::createFromUTF8String(char const*) (WebString.h:60)
==22718==    by 0x5333F15: WKStringCreateWithUTF8CString (WKString.cpp:41)
==22718==    by 0x541C9D2: WKBundleIntentCreate (WKBundleIntent.cpp:59)
==22718==    by 0x1887A7A8: WTR::TestRunner::deliverWebIntent(OpaqueJSString*, OpaqueJSString*, OpaqueJSString*) (TestRunner.cpp:698)
==22718==    by 0x1888A88F: WTR::JSTestRunner::deliverWebIntent(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) (JSTestRunner.cpp:1124)
Comment 1 Sudarsana Nagineni (babu) 2012-09-19 07:47:59 PDT
Created attachment 164738 [details]
Patch
Comment 2 Chris Dumez 2012-09-19 08:17:05 PDT
Comment on attachment 164738 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=164738&action=review

LGTM. Thanks for fixing this.

> Tools/ChangeLog:9
> +        created with WKStringCreateWtyUTF8CString().

nit: WKStringCreateWithUTF8CString()
Comment 3 Sudarsana Nagineni (babu) 2012-09-19 08:34:08 PDT
Created attachment 164742 [details]
Patch

Fixed nit.
Comment 4 WebKit Review Bot 2012-09-19 10:57:09 PDT
Comment on attachment 164742 [details]
Patch

Clearing flags on attachment: 164742

Committed r129022: <http://trac.webkit.org/changeset/129022>
Comment 5 WebKit Review Bot 2012-09-19 10:57:12 PDT
All reviewed patches have been landed.  Closing bug.