https://bugs.winehq.org/show_bug.cgi?id=43390
Bug ID: 43390 Summary: valgrind shows a few definite leaks in dlls/xaudio2_7/tests/xaudio2.c Product: Wine Version: 2.12 Hardware: x86 OS: Linux Status: NEW Keywords: download, source, testcase, valgrind Severity: normal Priority: P2 Component: xaudio2 Assignee: wine-bugs@winehq.org Reporter: austinenglish@gmail.com Distribution: Gentoo
==3551== 8 bytes in 1 blocks are definitely lost in loss record 63 of 766 ==3551== at 0x7BC51061: notify_alloc (heap.c:254) ==3551== by 0x7BC5554F: RtlAllocateHeap (heap.c:1716) ==3551== by 0x5C85281: XAudio2Create (xaudio_dll.c:2159) ==3551== by 0x4A1B741: func_xaudio2 (xaudio2.c:1150) ==3551== by 0x4A1C74F: run_test (test.h:603) ==3551== by 0x4A1CBAD: main (test.h:687) ==3551==
==3551== 12 bytes in 1 blocks are definitely lost in loss record 94 of 766 ==3551== at 0x7BC51061: notify_alloc (heap.c:254) ==3551== by 0x7BC5554F: RtlAllocateHeap (heap.c:1716) ==3551== by 0x5C7DA6D: CreateAudioVolumeMeter (xapofx.c:795) ==3551== by 0x4A1B1A7: test_xapo_creation_modern (xaudio2.c:1053) ==3551== by 0x4A1B463: test_xapo_creation (xaudio2.c:1089) ==3551== by 0x4A1B5B4: func_xaudio2 (xaudio2.c:1122) ==3551== by 0x4A1C74F: run_test (test.h:603) ==3551== by 0x4A1CBAD: main (test.h:687) ==3551==
==3551== 12 bytes in 1 blocks are definitely lost in loss record 95 of 766 ==3551== at 0x7BC51061: notify_alloc (heap.c:254) ==3551== by 0x7BC5554F: RtlAllocateHeap (heap.c:1716) ==3551== by 0x5C7DAFA: CreateAudioReverb (xapofx.c:809) ==3551== by 0x4A1B2D4: test_xapo_creation_modern (xaudio2.c:1067) ==3551== by 0x4A1B463: test_xapo_creation (xaudio2.c:1089) ==3551== by 0x4A1B5B4: func_xaudio2 (xaudio2.c:1122) ==3551== by 0x4A1C74F: run_test (test.h:603) ==3551== by 0x4A1CBAD: main (test.h:687) ==3551==
==3551== 12 bytes in 1 blocks are definitely lost in loss record 96 of 766 ==3551== at 0x7BC51061: notify_alloc (heap.c:254) ==3551== by 0x7BC5554F: RtlAllocateHeap (heap.c:1716) ==3551== by 0x5C7DA6D: CreateAudioVolumeMeter (xapofx.c:795) ==3551== by 0x4A176DB: test_simple_streaming (xaudio2.c:293) ==3551== by 0x4A1B807: func_xaudio2 (xaudio2.c:1158) ==3551== by 0x4A1C74F: run_test (test.h:603) ==3551== by 0x4A1CBAD: main (test.h:687) ==3551==
==3551== 48 bytes in 4 blocks are definitely lost in loss record 349 of 766 ==3551== at 0x7BC51061: notify_alloc (heap.c:254) ==3551== by 0x7BC5554F: RtlAllocateHeap (heap.c:1716) ==3551== by 0x5CA3F03: ??? ==3551== by 0x5CA4059: ??? ==3551== by 0x4A1A97C: test_xapo_creation_legacy (xaudio2.c:932) ==3551== by 0x4A1B3ED: test_xapo_creation (xaudio2.c:1083) ==3551== by 0x4A1B5B4: func_xaudio2 (xaudio2.c:1122) ==3551== by 0x4A1C74F: run_test (test.h:603) ==3551== by 0x4A1CBAD: main (test.h:687) ==3551==
==3551== 48 bytes in 4 blocks are definitely lost in loss record 350 of 766 ==3551== at 0x7BC51061: notify_alloc (heap.c:254) ==3551== by 0x7BC5554F: RtlAllocateHeap (heap.c:1716) ==3551== by 0x5C37F03: ??? ==3551== by 0x5C38059: ??? ==3551== by 0x4A1A97C: test_xapo_creation_legacy (xaudio2.c:932) ==3551== by 0x4A1B401: test_xapo_creation (xaudio2.c:1084) ==3551== by 0x4A1B5B4: func_xaudio2 (xaudio2.c:1122) ==3551== by 0x4A1C74F: run_test (test.h:603) ==3551== by 0x4A1CBAD: main (test.h:687) ==3551==
==3551== 48 bytes in 4 blocks are definitely lost in loss record 351 of 766 ==3551== at 0x7BC51061: notify_alloc (heap.c:254) ==3551== by 0x7BC5554F: RtlAllocateHeap (heap.c:1716) ==3551== by 0x5CA3F03: ??? ==3551== by 0x5CA4059: ??? ==3551== by 0x4A1A97C: test_xapo_creation_legacy (xaudio2.c:932) ==3551== by 0x4A1B415: test_xapo_creation (xaudio2.c:1085) ==3551== by 0x4A1B5B4: func_xaudio2 (xaudio2.c:1122) ==3551== by 0x4A1C74F: run_test (test.h:603) ==3551== by 0x4A1CBAD: main (test.h:687) ==3551==
==3551== 48 bytes in 4 blocks are definitely lost in loss record 352 of 766 ==3551== at 0x7BC51061: notify_alloc (heap.c:254) ==3551== by 0x7BC5554F: RtlAllocateHeap (heap.c:1716) ==3551== by 0x5CA3F03: ??? ==3551== by 0x5CA4059: ??? ==3551== by 0x4A1A97C: test_xapo_creation_legacy (xaudio2.c:932) ==3551== by 0x4A1B429: test_xapo_creation (xaudio2.c:1086) ==3551== by 0x4A1B5B4: func_xaudio2 (xaudio2.c:1122) ==3551== by 0x4A1C74F: run_test (test.h:603) ==3551== by 0x4A1CBAD: main (test.h:687) ==3551==
==3551== 48 bytes in 4 blocks are definitely lost in loss record 353 of 766 ==3551== at 0x7BC51061: notify_alloc (heap.c:254) ==3551== by 0x7BC5554F: RtlAllocateHeap (heap.c:1716) ==3551== by 0x5CA3F03: ??? ==3551== by 0x5CA4059: ??? ==3551== by 0x4A1A97C: test_xapo_creation_legacy (xaudio2.c:932) ==3551== by 0x4A1B43D: test_xapo_creation (xaudio2.c:1087) ==3551== by 0x4A1B5B4: func_xaudio2 (xaudio2.c:1122) ==3551== by 0x4A1C74F: run_test (test.h:603) ==3551== by 0x4A1CBAD: main (test.h:687) ==3551==
==3551== 48 bytes in 4 blocks are definitely lost in loss record 354 of 766 ==3551== at 0x7BC51061: notify_alloc (heap.c:254) ==3551== by 0x7BC5554F: RtlAllocateHeap (heap.c:1716) ==3551== by 0x5E44F03: ??? ==3551== by 0x5E45059: ??? ==3551== by 0x4A1A97C: test_xapo_creation_legacy (xaudio2.c:932) ==3551== by 0x4A1B451: test_xapo_creation (xaudio2.c:1088) ==3551== by 0x4A1B5B4: func_xaudio2 (xaudio2.c:1122) ==3551== by 0x4A1C74F: run_test (test.h:603) ==3551== by 0x4A1CBAD: main (test.h:687) ==3551==
==3551== 48 bytes in 4 blocks are definitely lost in loss record 355 of 766 ==3551== at 0x7BC51061: notify_alloc (heap.c:254) ==3551== by 0x7BC5554F: RtlAllocateHeap (heap.c:1716) ==3551== by 0x5C7DC35: CreateFX (xapofx.c:835) ==3551== by 0x4A1AE99: test_xapo_creation_modern (xaudio2.c:1018) ==3551== by 0x4A1B463: test_xapo_creation (xaudio2.c:1089) ==3551== by 0x4A1B5B4: func_xaudio2 (xaudio2.c:1122) ==3551== by 0x4A1C74F: run_test (test.h:603) ==3551== by 0x4A1CBAD: main (test.h:687) ==3551==
https://bugs.winehq.org/show_bug.cgi?id=43390
Ethan Lee flibitijibibo@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |flibitijibibo@gmail.com
--- Comment #1 from Ethan Lee flibitijibibo@gmail.com --- If you're still up for it, can you try running these tests with Wine 4.3's new XAudio2 implementation?
https://bugs.winehq.org/show_bug.cgi?id=43390
--- Comment #2 from Austin English austinenglish@gmail.com --- Created attachment 64074 --> https://bugs.winehq.org/attachment.cgi?id=64074 wine-4.5-83-g33c35baa67 valgrind log
https://bugs.winehq.org/show_bug.cgi?id=43390
--- Comment #3 from Ethan Lee flibitijibibo@gmail.com --- Looks like there are three categories of error:
1. XAPOFX leaks. These are definitely bugs! I think we're just missing a Release in xapo.c somewhere. 2. Leak warnings for voices. This is probably because we don't free voice memory until IXAudio2_Release, so when we leave the tests without freeing any of the voices it thinks we've leaked. 3. Leak warnings in XAudio2 callbacks. This may just be that we're running ok()s in a separate thread than the main one, but I'm not sure why it would warn just because of that... in any case, we don't allocate/free anything in the callbacks, so this one's probably okay(?).
https://bugs.winehq.org/show_bug.cgi?id=43390
--- Comment #4 from Austin English austinenglish@gmail.com --- (In reply to Ethan Lee from comment #3)
Looks like there are three categories of error:
- XAPOFX leaks. These are definitely bugs! I think we're just missing a
Release in xapo.c somewhere. 2. Leak warnings for voices. This is probably because we don't free voice memory until IXAudio2_Release, so when we leave the tests without freeing any of the voices it thinks we've leaked. 3. Leak warnings in XAudio2 callbacks. This may just be that we're running ok()s in a separate thread than the main one, but I'm not sure why it would warn just because of that... in any case, we don't allocate/free anything in the callbacks, so this one's probably okay(?).
Hi Ethan,
Could you either send a PR against https://github.com/austin987/wine-valgrind-scripts, or give me some more details/regex of what we can ignore? And maybe fix the real bugs as well ;)?
https://bugs.winehq.org/show_bug.cgi?id=43390
--- Comment #5 from Ethan Lee flibitijibibo@gmail.com --- The ones that can be ignored will look like one of these two, both are "possibly lost" messages:
1. at notify_alloc by RtlAllocateHeap by create_voice by IXAudio2Impl_CreateSourceVoice/CreateSubmixVoice
2. at notify_alloc by RtlAllocateHeap by get_tls_data by winetest_set_location by IXAudio2VoiceCallback_*/IXAudio2EngineCallback_*
I believe the rest are valid errors.
https://bugs.winehq.org/show_bug.cgi?id=43390
--- Comment #6 from Austin English austinenglish@gmail.com --- Thanks, I added a suppression: https://github.com/austin987/wine-valgrind-scripts/commit/9f3e604946cff48c25...