http://bugs.winehq.org/show_bug.cgi?id=26131
Summary: dsound/duplex tests show an uninitialized variable under valgrind Product: Wine Version: 1.3.13 Platform: x86 OS/Version: Linux Status: NEW Keywords: download, source, testcase Severity: normal Priority: P2 Component: directx-dsound AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
Conditional jump or move depends on uninitialised value(s) at snd_pcm_mmap_begin (in /usr/lib/libasound.so.2.0.0) by CreateMMAP (dscapture.c:513) by IDsCaptureDriverBufferImpl_SetFormat (dscapture.c:737) by IDsCaptureDriverImpl_CreateCaptureBuffer (dscapture.c:1039) by IDirectSoundCaptureBufferImpl_Create (capture.c:935) by IDirectSoundCaptureImpl_CreateCaptureBuffer (capture.c:1256) by IDirectSoundFullDuplexImpl_Initialize (duplex.c:592) by DirectSoundFullDuplexCreate (duplex.c:737) by IDirectSoundFullDuplex_tests (duplex.c:184) by func_duplex (duplex.c:239) by run_test (test.h:556) by main (test.h:624) Uninitialised value was created by a stack allocation at CreateMMAP (dscapture.c:460)
though perhaps that's an alsa bug?
http://bugs.winehq.org/show_bug.cgi?id=26131
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |26132
http://bugs.winehq.org/show_bug.cgi?id=26131
Raymond superquad.vortex2@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |superquad.vortex2@gmail.com
--- Comment #1 from Raymond superquad.vortex2@gmail.com 2011-03-28 02:46:51 CDT --- (In reply to comment #0)
Conditional jump or move depends on uninitialised value(s) at snd_pcm_mmap_begin (in /usr/lib/libasound.so.2.0.0) by CreateMMAP (dscapture.c:513) by IDsCaptureDriverBufferImpl_SetFormat (dscapture.c:737) by IDsCaptureDriverImpl_CreateCaptureBuffer (dscapture.c:1039) by IDirectSoundCaptureBufferImpl_Create (capture.c:935) by IDirectSoundCaptureImpl_CreateCaptureBuffer (capture.c:1256) by IDirectSoundFullDuplexImpl_Initialize (duplex.c:592) by DirectSoundFullDuplexCreate (duplex.c:737) by IDirectSoundFullDuplex_tests (duplex.c:184) by func_duplex (duplex.c:239) by run_test (test.h:556) by main (test.h:624) Uninitialised value was created by a stack allocation at CreateMMAP (dscapture.c:460)
though perhaps that's an alsa bug?
Are your sure ?
since pdbi->mmap is already assigned before calling CreateMMAP()
This->mmap = mmap;
snd_pcm_prepare(This->pcm); CreateMMAP(This);
The bug is actually mmap_mode
mmap_mode = snd_pcm_type(pcm);
if (mmap_mode == SND_PCM_TYPE_HW) TRACE("mmap'd buffer is a direct hardware buffer.\n"); else if (mmap_mode == SND_PCM_TYPE_DMIX) TRACE("mmap'd buffer is an ALSA dmix buffer\n"); else TRACE("mmap'd buffer is an ALSA type %d buffer\n", mmap_mode);
since mmap_mode is not related to access_mmap (e.g. pulse does not support mmap but the trace still say
"trace:dsalsa:CreateMMAP mmap'd buffer is an ALSA type 28 buffer"
type 28 is SND_PCM_TYPE_IOPLUG ( it can be jack or pulse plugin )
err = snd_pcm_hw_params_set_access (pcm, hw_params, SND_PCM_ACCESS_MMAP_INTERLEAVED); if (err < 0) { err = snd_pcm_hw_params_set_access (pcm, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED); if (err < 0) { WARN("Could not set access\n"); goto err; } mmap = 0; } else mmap = 1;
http://bugs.winehq.org/show_bug.cgi?id=26131
--- Comment #2 from Austin English austinenglish@gmail.com 2012-09-17 14:25:15 CDT --- There's still a couple problems in wine-1.5.13-63-gcaf6fe0 / valgrind 3.7.0:
==29342== Invalid free() / delete / delete[] / realloc() ==29342== at 0x7BC4BB9A: RtlReAllocateHeap (heap.c:269) ==29342== by 0x51C2C95: DirectSoundDevice_RemoveBuffer (dsound.c:1106) ==29342== by 0x51BA925: secondarybuffer_destroy (buffer.c:975) ==29342== by 0x51BACAB: IDirectSoundBufferImpl_Release (buffer.c:342) ==29342== by 0x4906843: func_duplex (duplex.c:329) ==29342== by 0x48ED376: main (test.h:557) ==29342== Address 0x7f06c6e8 is 0 bytes inside a block of size 4 alloc'd ==29342== at 0x7BC4AF30: RtlAllocateHeap (heap.c:254) ==29342== by 0x51C2BA1: DirectSoundDevice_AddBuffer (dsound.c:1066) ==29342== by 0x51BA6A6: IDirectSoundBufferImpl_Create (buffer.c:952) ==29342== by 0x51C21CB: DirectSoundDevice_CreateSoundBuffer (dsound.c:997) ==29342== by 0x51C277F: IDirectSound8Impl_CreateSoundBuffer (dsound.c:242) ==29342== by 0x51C61FF: IDirectSoundFullDuplexImpl_Initialize (duplex.c:216) ==29342== by 0x490633B: func_duplex (duplex.c:286) ==29342== by 0x48ED376: main (test.h:557) ==29342==
==29342== Invalid free() / delete / delete[] / realloc() ==29342== at 0x7BC4BB9A: RtlReAllocateHeap (heap.c:269) ==29342== by 0x51C2C95: DirectSoundDevice_RemoveBuffer (dsound.c:1106) ==29342== by 0x51BA925: secondarybuffer_destroy (buffer.c:975) ==29342== by 0x51C08B3: DirectSoundDevice_Release (dsound.c:670) ==29342== by 0x51C0B07: directsound_destroy (dsound.c:123) ==29342== by 0x51C0CBE: IUnknownImpl_Release (dsound.c:183) ==29342== by 0x51C5904: fullduplex_destroy (duplex.c:60) ==29342== by 0x51C5A4E: IDirectSoundFullDuplexImpl_Release (duplex.c:175) ==29342== by 0x4905C2C: IDirectSoundFullDuplex_test.isra.0 (duplex.c:101) ==29342== by 0x4906C05: func_duplex (duplex.c:190) ==29342== by 0x48ED376: main (test.h:557) ==29342== Address 0x7f004148 is 8 bytes inside a block of size 355 free'd ==29342== at 0x7BC4A514: RtlFreeHeap (heap.c:1764) ==29342== by 0x7BC3DD9F: wine_nt_to_unix_file_name (directory.c:3002) ==29342== by 0x7BC3E661: nt_to_unix_file_name_attr (directory.c:2831) ==29342== by 0x7BC41B11: FILE_CreateFile (file.c:122) ==29342== by 0x7BC42043: NtOpenFile (file.c:235) ==29342== by 0x7BC294E5: open_nt_file (actctx.c:1601) ==29342== by 0x7BC30D4C: get_manifest_in_associated_manifest.constprop.9 (actctx.c:1811) ==29342== by 0x7BC32302: RtlCreateActivationContext (actctx.c:2310) ==29342== by 0x7BC325EE: actctx_init (actctx.c:2223) ==29342== by 0x7BC53C5B: LdrInitializeThunk (loader.c:2697) ==29342== by 0x7B863B07: __wine_kernel_init (process.c:1255) ==29342== by 0x7BC544D2: __wine_process_init (loader.c:2918) ==29342== by 0x40370C1: wine_init (loader.c:831) ==29342== by 0x7BF00EBA: main (main.c:230) ==29342==
http://bugs.winehq.org/show_bug.cgi?id=26131
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |4e06eead8f446f0167e6c92f0cc | |09f943122a7cd Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #3 from Austin English austinenglish@gmail.com 2012-09-26 14:09:23 CDT --- Fixed by http://source.winehq.org/git/wine.git/commitdiff/4e06eead8f446f0167e6c92f0cc...
http://bugs.winehq.org/show_bug.cgi?id=26131
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org 2012-09-28 13:43:27 CDT --- Closing bugs fixed in 1.5.14.