[Bug 36348] New: valgrind shows a couple leaks in d3d9/tests/d3d9ex.c
https://bugs.winehq.org/show_bug.cgi?id=36348 Bug ID: 36348 Summary: valgrind shows a couple leaks in d3d9/tests/d3d9ex.c Product: Wine Version: 1.7.17 Hardware: x86 OS: Linux Status: NEW Keywords: download, source, testcase Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs(a)winehq.org Reporter: austinenglish(a)gmail.com ==3976== 16 bytes in 1 blocks are definitely lost in loss record 396 of 1,973 ==3976== at 0x7BC50A9B: RtlAllocateHeap (heap.c:255) ==3976== by 0x4F58C13: Direct3DCreate9Ex (d3d9_main.c:63) ==3976== by 0x4A557EB: create_device.constprop.1 (d3d9ex.c:59) ==3976== by 0x4A55992: test_reset (d3d9ex.c:684) ==3976== by 0x4A5A5CB: func_d3d9ex (d3d9ex.c:1218) ==3976== by 0x4ADCD4C: run_test (test.h:584) ==3976== by 0x4ADD13B: main (test.h:654) ==3976== ==3976== 12,068 bytes in 1 blocks are definitely lost in loss record 1,915 of 1,973 ==3976== at 0x7BC50A9B: RtlAllocateHeap (heap.c:255) ==3976== by 0x506F901: wined3d_create (wined3d_main.c:95) ==3976== by 0x4F654AE: d3d9_init (directx.c:647) ==3976== by 0x4F58C30: Direct3DCreate9Ex (d3d9_main.c:66) ==3976== by 0x4A557EB: create_device.constprop.1 (d3d9ex.c:59) ==3976== by 0x4A55992: test_reset (d3d9ex.c:684) ==3976== by 0x4A5A5CB: func_d3d9ex (d3d9ex.c:1218) ==3976== by 0x4ADCD4C: run_test (test.h:584) ==3976== by 0x4ADD13B: main (test.h:654) ==3976== -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36348 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |valgrind -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36348 --- Comment #1 from Austin English <austinenglish(a)gmail.com> --- Also: ../../../tools/runtest -q -P wine -T ../../.. -M d3d9.dll -p d3d9_test.exe.so d3d9ex && touch d3d9ex.ok ==6443== 16 bytes in 1 blocks are definitely lost in loss record 150 of 936 ==6443== at 0x7BC49E0E: notify_alloc (heap.c:254) ==6443== by 0x7BC4E044: RtlAllocateHeap (heap.c:1715) ==6443== by 0x4947EB9: Direct3DCreate9Ex (d3d9_main.c:63) ==6443== by 0x4877696: test_wndproc (d3d9ex.c:2114) ==6443== by 0x487B247: func_d3d9ex (d3d9ex.c:2929) ==6443== by 0x4907463: run_test (test.h:584) ==6443== by 0x490789D: main (test.h:666) ==6443== -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36348 --- Comment #2 from Henri Verbeet <hverbeet(a)gmail.com> --- Created attachment 51301 --> https://bugs.winehq.org/attachment.cgi?id=51301 patch I think the attached patch should help. I don't see how the leaks from comment 0 happen, as far as I can see here the allocations are properly free'd again. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36348 --- Comment #3 from Austin English <austinenglish(a)gmail.com> --- (In reply to Henri Verbeet from comment #2)
Created attachment 51301 [details] patch
I think the attached patch should help. I don't see how the leaks from comment 0 happen, as far as I can see here the allocations are properly free'd again.
The leaks from comment #0 aren't occurring in 1.7.41. The patch does help, though a new issue appears after that: ==31771== Conditional jump or move depends on uninitialised value(s) ==31771== at 0x4E9551A: normalize_nonclientmetrics (sysparams.c:635) ==31771== by 0x4E97938: SystemParametersInfoW (sysparams.c:1583) ==31771== by 0x4E9A583: GetSystemMetrics (sysparams.c:2414) ==31771== by 0x4E9A6FB: GetSystemMetrics (sysparams.c:2433) ==31771== by 0x4EAE481: WINPOS_GetMinMaxInfo (winpos.c:774) ==31771== by 0x4EA7291: WIN_CreateWindowEx (win.c:1565) ==31771== by 0x4EA7A8D: CreateWindowExW (win.c:1748) ==31771== by 0x521FE3D: grab_clipping_window (mouse.c:372) ==31771== by 0x5220590: clip_fullscreen_window (mouse.c:520) ==31771== by 0x520C6E1: update_windows_on_desktop_resize (desktop.c:210) ==31771== by 0x4EAAF39: EnumWindows (win.c:3291) ==31771== by 0x520CAB8: X11DRV_resize_desktop (desktop.c:285) ==31771== by 0x524759C: xrandr12_set_current_mode (xrandr.c:362) ==31771== by 0x5233031: X11DRV_ChangeDisplaySettingsEx (settings.c:420) ==31771== by 0x4E9B40E: ChangeDisplaySettingsExW (sysparams.c:2795) ==31771== by 0x4B6A790: wined3d_set_adapter_display_mode (directx.c:3965) ==31771== by 0x4BF4C92: wined3d_swapchain_activate (swapchain.c:1207) ==31771== by 0x4B5D3E2: device_process_message (device.c:5035) ==31771== by 0x4C0DECF: wined3d_wndproc (wined3d_main.c:404) ==31771== by 0x4EB44C9: ??? (winproc.c:174) ==31771== Uninitialised value was created by a stack allocation ==31771== at 0x4E9548B: normalize_nonclientmetrics (sysparams.c:626) ==31771== -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36348 --- Comment #4 from Henri Verbeet <hverbeet(a)gmail.com> --- (In reply to Austin English from comment #3)
The leaks from comment #0 aren't occurring in 1.7.41. The patch does help, though a new issue appears after that: Does that happen consistently? (As opposed to being some kind of race.) It's slightly odd that this patch would make that issue show up, although it looks like a user32 thing to me either way.
-- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36348 --- Comment #5 from Austin English <austinenglish(a)gmail.com> --- (In reply to Henri Verbeet from comment #4)
(In reply to Austin English from comment #3)
The leaks from comment #0 aren't occurring in 1.7.41. The patch does help, though a new issue appears after that: Does that happen consistently? (As opposed to being some kind of race.) It's slightly odd that this patch would make that issue show up, although it looks like a user32 thing to me either way.
Not consistent, though I have been able to reproduce it. After https://source.winehq.org/git/wine.git/commitdiff/ca00d72da3d959df1e6a6d619e..., running d3d9ex.c is causing the display to change resolution and it fails to return to its original size. xrandr -s was useful originally, but later failures required a restart of X. When the user32 failure occurs, the resolution is very wrong. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36348 joaopa <jeremielapuree(a)yahoo.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree(a)yahoo.fr --- Comment #6 from joaopa <jeremielapuree(a)yahoo.fr> --- What about this bug with current wine(3.20)? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36348 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from Austin English <austinenglish(a)gmail.com> --- (In reply to joaopa from comment #6)
What about this bug with current wine(3.20)?
Let's call it fixed. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36348 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #8 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 4.2. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org