[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#642387: libx11-6: Leak found under valgrind in XGetVisualInfo (VisUtil.c:135)



On Wed, Sep 21, 2011 at 22:00:47 -0700, Austin English wrote:

> Package: libx11-6
> Version: 2:1.4.4-1
> Severity: minor
> 
> Dear Maintainer,
> 
> Found while valgrinding wine (wine-1.3.28-451-ge2cc32d / git-sha1sum:
> e2cc32d252c01f3b00ef02a2084a810a082ff0a9):
> ==17495== 2,800 bytes in 1 blocks are definitely lost in loss record 849 of 883
> ==17495==    at 0x4025D22: realloc (vg_replace_malloc.c:488)
> ==17495==    by 0x577238C: XGetVisualInfo (VisUtil.c:135)
> ==17495==    by 0x7BC34932: interlocked_inc (critsection.c:45)
> ==17495==    by 0x7BC3535B: RtlEnterCriticalSection (critsection.c:546)
> ==17495==    by 0x594185B: glXGetFBConfigs (glxapi.c:552)
> ==17495==    by 0x56CB9E4: X11DRV_ChoosePixelFormat (opengl.c:1227)
> ==17495==    by 0x4DED422: ChoosePixelFormat (painting.c:551)
> ==17495==    by 0x4F7D525: WineD3D_CreateFakeGLContext (directx.c:324)
> ==17495==    by 0x4F9757F: InitAdapters (directx.c:5257)
> ==17495==    by 0x4F982A8: wined3d_init (directx.c:5480)
> ==17495==    by 0x503AFE1: wined3d_create (wined3d_main.c:105)
> ==17495==    by 0x4EED127: Direct3DCreate9 (d3d9_main.c:43)
> ==17495==    by 0x4930831: test_setting_constants (shader.c:637)
> ==17495==    by 0x49313C9: func_shader (shader.c:855)
> ==17495==    by 0x493D179: run_test (test.h:556)
> ==17495==    by 0x493D569: main (test.h:624)
> ==17495==
> 
> script used:
> export LD_LIBRARY_PATH="/home/austin/src/mesa/lib"
> export LIBGL_DRIVERS_PATH="/home/austin/src/mesa/lib/gallium"
> export VALGRIND_OPTS="-q --trace-children=yes --track-origins=yes
> --gen-suppressions=all
> --suppressions=$HOME/wine-git/tools/valgrind/valgrind-suppressions
> --leak-check=full --num-callers=20  --workaround-gcc296-bugs=yes
> --vex-iropt-precise-memory-exns=yes"
> export WINETEST_WRAPPER='valgrind'
> export WINE_HEAP_TAIL_REDZONE=32
> cd $HOME/wine-git/dlls/d3dx9_36/tests
> make shader.ok
> 
> 
> Expected outcome:
> no leaks outside of Wine
> 
> Actual outcome:
> Leak from X11.
> 
That rather looks like a missing XFree() somewhere else,
XGetVisualInfo() returns the data it allocates to the caller.

Cheers,
Julien



Reply to: