Bug 105770 - [AC] Memory leak in GraphicsSurfacePrivate::findFBConfigWithAlpha()
Summary: [AC] Memory leak in GraphicsSurfacePrivate::findFBConfigWithAlpha()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sudarsana Nagineni (babu)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-26 09:11 PST by Sudarsana Nagineni (babu)
Modified: 2013-01-02 03:26 PST (History)
3 users (show)

See Also:


Attachments
patch (1.41 KB, patch)
2012-12-26 09:34 PST, Sudarsana Nagineni (babu)
noam: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (1.43 KB, patch)
2013-01-02 03:04 PST, 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-12-26 09:11:53 PST
Found a memory leak in GraphicsSurfacePrivate::findFBConfigWithAlpha(). 

==21489== 14,720 bytes in 23 blocks are definitely lost in loss record 3,184 of 3,192
==21489==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21489==    by 0xCB26915: XGetVisualInfo (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==21489==    by 0xC8A72CE: glXGetVisualFromFBConfig (in /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2)
==21489==    by 0x9EF97F5: WebCore::GraphicsSurfacePrivate::findFBConfigWithAlpha(__GLXFBConfigRec**, int) (GraphicsSurfaceGLX.cpp:355)
==21489==    by 0x9EF931E: WebCore::GraphicsSurfacePrivate::createPixmap(unsigned int) (GraphicsSurfaceGLX.cpp:249)
==21489==    by 0x9EF970F: WebCore::GraphicsSurfacePrivate::glxPixmap() const (GraphicsSurfaceGLX.cpp:336)
==21489==    by 0x9EF8382: WebCore::GraphicsSurface::platformGetTextureID() (GraphicsSurfaceGLX.cpp:419)
==21489==    by 0x9EF85D0: WebCore::GraphicsSurface::platformSwapBuffers() (GraphicsSurfaceGLX.cpp:454)
==21489==    by 0x9EF799B: WebCore::GraphicsSurface::swapBuffers() (GraphicsSurface.cpp:78)
==21489==    by 0x9471B07: WebCore::TextureMapperSurfaceBackingStore::swapBuffersIfNeeded(unsigned int) (TextureMapperBackingStore.cpp:45)
==21489==    by 0x56AC2C8: WebKit::LayerTreeRenderer::syncCanvas(unsigned int, unsigned int) (LayerTreeRenderer.cpp:252)

We should free the XVisualInfo returned by glXGetVisualFromFBConfig() to avoid this leak.
Comment 1 Sudarsana Nagineni (babu) 2012-12-26 09:34:15 PST
Created attachment 180753 [details]
patch
Comment 2 WebKit Review Bot 2013-01-02 02:45:55 PST
Comment on attachment 180753 [details]
patch

Rejecting attachment 180753 [details] from commit-queue.

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', u'--status-host=queues.webkit.org', ..." exit_code: 1 cwd: /mnt/git/webkit-commit-queue

/mnt/git/webkit-commit-queue/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://queues.webkit.org/results/15623657
Comment 3 Sudarsana Nagineni (babu) 2013-01-02 03:04:14 PST
Created attachment 181019 [details]
Patch for landing

Updated the changelog. Thanks for reviewing!
Comment 4 WebKit Review Bot 2013-01-02 03:26:07 PST
Comment on attachment 181019 [details]
Patch for landing

Clearing flags on attachment: 181019

Committed r138614: <http://trac.webkit.org/changeset/138614>
Comment 5 WebKit Review Bot 2013-01-02 03:26:11 PST
All reviewed patches have been landed.  Closing bug.