[Webkit-unassigned] [Bug 33770] New: dataFunctionMatrix leaks the array allocated by toArray

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 17 03:02:29 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=33770

           Summary: dataFunctionMatrix leaks the array allocated by
                    toArray
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
               URL: http://build.webkit.org/results/SnowLeopard%20Intel%20
                    Leaks/r53371%20(3490)/DumpRenderTree-leaks.txt
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebGL
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: mrowe at apple.com
                CC: cmarrin at apple.com, kbr at google.com


The call to toArray allocates an array and transfers ownership to the caller. 
The array is not freed.

The interface of toArray seems quite error-prone. Even internally the
implementation of toArray looks like it will leak memory when error conditions
are hit.  It shouldn’t be working with raw pointers that have to be explicitly
freed.  A Vector<T> seems like a reasonable fit for this sort of data.  If it’s
not a good fit for some reason, then we have OwnPtr / PassOwnPtr to manage the
lifetime of manually-allocated memory.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list