http://bugs.winehq.org/show_bug.cgi?id=26133
Summary: d3dx9_36: surface and texture tests shows an invalid read under valgrind Product: Wine Version: 1.3.13 Platform: x86 OS/Version: Linux Status: NEW Keywords: download, source, testcase Severity: minor Priority: P2 Component: directx-d3dx9 AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com CC: wine-bugs@winehq.org
surface test: Invalid read of size 4 at point_filter_simple_data (surface.c:737) by D3DXLoadSurfaceFromMemory (surface.c:842) by D3DXLoadSurfaceFromFileInMemory (surface.c:402) by D3DXLoadSurfaceFromResourceA (surface.c:513) by test_D3DXLoadSurface (surface.c:272) by func_surface (surface.c:540) by run_test (test.h:556) by main (test.h:624) Address 0x7f0228f0 is 0 bytes inside a block of size 16 free'd at notify_free (heap.c:262) by RtlFreeHeap (heap.c:1747) by BITMAP_CopyBitmap (bitmap.c:548) by CreateBrushIndirect (brush.c:117) by CreatePatternBrush (brush.c:221) by SYSPARAMS_Init (sysparams.c:956) by process_attach (user_main.c:276) by DllMain (user_main.c:332) by __wine_spec_dll_entry (dll_entry.c:40) by ??? (loader.c:139) by MODULE_InitDLL (loader.c:978) by process_attach (loader.c:1067) by process_attach (loader.c:1059) by process_attach (loader.c:1059) by process_attach (loader.c:1059) by attach_process_dlls (loader.c:2535) by ??? (port.c:60)
texture test: Invalid read of size 4 at point_filter_simple_data (surface.c:737) by D3DXLoadSurfaceFromMemory (surface.c:842) by D3DXLoadSurfaceFromFileInMemory (surface.c:402) by D3DXCreateTextureFromFileInMemoryEx (texture.c:605) by D3DXCreateTextureFromResourceExA (texture.c:810) by D3DXCreateTextureFromResourceA (texture.c:759) by test_D3DXCreateTexture (texture.c:576) by func_texture (texture.c:1106) by run_test (test.h:556) by main (test.h:624) Address 0x7f0171b8 is 32 bytes inside a block of size 56 free'd at notify_free (heap.c:262) by RtlFreeHeap (heap.c:1747) by update_reg_entries (freetype.c:2027) by WineEngInit (freetype.c:2877) by DllMain (gdiobj.c:582) by __wine_spec_dll_entry (dll_entry.c:40) by ??? (loader.c:139) by MODULE_InitDLL (loader.c:978) by process_attach (loader.c:1067) by process_attach (loader.c:1059) by process_attach (loader.c:1059) by process_attach (loader.c:1059) by process_attach (loader.c:1059) by attach_process_dlls (loader.c:2535) by ??? (port.c:60)
http://bugs.winehq.org/show_bug.cgi?id=26133
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |matteo.mystral@gmail.com
--- Comment #1 from Matteo Bruni matteo.mystral@gmail.com 2011-02-15 10:42:37 CST --- This looks like a real issue and, if I understand it correctly, the fix is not entirely trivial. I'll soon prepare a patch for it.
http://bugs.winehq.org/show_bug.cgi?id=26133
--- Comment #2 from Matteo Bruni matteo.mystral@gmail.com 2011-02-18 12:59:42 CST --- Created an attachment (id=33338) --> (http://bugs.winehq.org/attachment.cgi?id=33338) Tentative fix
Austin, can you please test this patch with Valgrind? For some reasons Valgrind now crashes for me when running those tests...
http://bugs.winehq.org/show_bug.cgi?id=26133
--- Comment #3 from Austin English austinenglish@gmail.com 2011-02-22 00:19:44 CST --- After that patch, I get: ==7162== 400 bytes in 1 blocks are definitely lost in loss record 676 of 823 ==7162== at 0x4024210: malloc (vg_replace_malloc.c:236) ==7162== by 0x51BD44D: XGetVisualInfo (in /usr/lib/libX11.so.6.3.0) ==7162== by 0x578A723: get_visual (fakeglx.c:544) ==7162== by 0x578BAC3: choose_visual (fakeglx.c:642) ==7162== by 0x578BD06: Fake_glXChooseVisual (fakeglx.c:1241) ==7162== by 0x578F9E8: glXChooseVisual (glxapi.c:197) ==7162== by 0x50DE7CE: X11DRV_WineGL_InitOpenglInfo (opengl.c:318) ==7162== by 0x50E08B8: has_opengl (opengl.c:519) ==7162== by 0x50E57E1: X11DRV_wglGetProcAddress (opengl.c:1848) ==7162== by 0x4CE600D: wglGetProcAddress (opengl.c:378) ==7162== by 0x4E6B49A: InitAdapters (in /home/austin/wine-git/dlls/wined3d/wined3d.dll.so) ==7162== by 0x4E6E66A: wined3d_init (directx.c:5289) ==7162== by 0x4F12F4E: wined3d_create (wined3d_main.c:93) ==7162== by 0x4DC8635: Direct3DCreate9 (d3d9_main.c:43) ==7162== by 0x48FAA67: func_surface (surface.c:521) ==7162== by 0x49022DA: run_test (test.h:556) ==7162== by 0x49026CC: main (test.h:624) ==7162==
==7162== 2,800 bytes in 1 blocks are definitely lost in loss record 786 of 823 ==7162== at 0x4024306: realloc (vg_replace_malloc.c:525) ==7162== by 0x51BD631: XGetVisualInfo (in /usr/lib/libX11.so.6.3.0) ==7162== by 0x578C5DA: Fake_glXGetFBConfigs (fakeglx.c:1971) ==7162== by 0x578E889: glXGetFBConfigs (glxapi.c:552) ==7162== by 0x50E2998: get_formats (opengl.c:939) ==7162== by 0x50E38A3: X11DRV_ChoosePixelFormat (opengl.c:1222) ==7162== by 0x4CE6D77: ChoosePixelFormat (painting.c:345) ==7162== by 0x4E539C8: WineD3D_CreateFakeGLContext (directx.c:283) ==7162== by 0x4E6D8D4: InitAdapters (directx.c:5067) ==7162== by 0x4E6E66A: wined3d_init (directx.c:5289) ==7162== by 0x4F12F4E: wined3d_create (wined3d_main.c:93) ==7162== by 0x4DC8635: Direct3DCreate9 (d3d9_main.c:43) ==7162== by 0x48FAA67: func_surface (surface.c:521) ==7162== by 0x49022DA: run_test (test.h:556) ==7162== by 0x49026CC: main (test.h:624) ==7162==
but those were there before, looks like a mesa problem. The invalid reads are fixed for me.
http://bugs.winehq.org/show_bug.cgi?id=26133
--- Comment #4 from Matteo Bruni matteo.mystral@gmail.com 2011-02-22 05:19:21 CST --- Thank you Austin, I'm sending the patch to the mailing list in a moment.
http://bugs.winehq.org/show_bug.cgi?id=26133
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #5 from Austin English austinenglish@gmail.com 2011-02-23 13:19:00 CST --- Fixed by http://source.winehq.org/git/wine.git/?a=commitdiff;h=85a578f7828b7204cb1a8f...
http://bugs.winehq.org/show_bug.cgi?id=26133
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2011-03-04 12:35:19 CST --- Closing bugs fixed in 1.3.15.
https://bugs.winehq.org/show_bug.cgi?id=26133
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |85a578f7828b7204cb1a8f7cbda | |929ac9754df13 CC| |focht@gmx.net