Stack corruption in dsound.c

wylda at volny.cz wylda at volny.cz
Tue May 4 13:12:05 CDT 2010


Hi, for those of readers who don't know yet, i'm a "Hello word" programmer,
so sorry for bad wording or speculation etc.

I decided to look into a regression since wine 1.1.30, who nobody apparently
not know what to do, otherwise it would be solved ;)

The game freezes during sound initialization and i tracked it down by
printf debugging to heap allocation in DirectSoundDevice_Create(). Game
goes:

...
DirectSoundDevice_Create() //HeapAlloc OK
...
OpenAL Init
...
DirectSoundDevice_Create() //HeapAlloc returns insane values
...
fixme:dbghelp:validate_addr64 Unsupported address ffffffffb5e70000
fixme:dbghelp:validate_addr64 Unsupported address ffffffffb5a60000
fixme:dbghelp:validate_addr64 Unsupported address ffffffffb5a40000
fixme:dbghelp:validate_addr64 Unsupported address ffffffffb5950000
fixme:dbghelp:validate_addr64 Unsupported address ffffffffb5940000
fixme:dbghelp:validate_addr64 Unsupported address ffffffffb5920000
Frozen

This happens only when builtin OpenAL is used. In this case HeapAlloc
gives values always beginning with 0x234vwxyz.

Builtin OpenAL example (*** BAD - Game freezes ***):
device = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(DirectSoundDevice));

First call of DirectSoundDevice_Create():
0x0014f908 = HeapAlloc(0x00110000, 0x00000008, 0x000003d4)

Second call of DirectSoundDevice_Create():
0x234228e0 = HeapAlloc(0x00110000, 0x00000008, 0x000003d4)



Native OpenAL example(*** OK - Game runs***):

First call of DirectSoundDevice_Create():
0x0014fa30 = HeapAlloc(0x00110000, 0x00000008, 0x000003d4)

Second call of DirectSoundDevice_Create():
0x001566c0 = HeapAlloc(0x00110000, 0x00000008, 0x000003d4)


So how do i find out, why HeapAlloc does not return sane values like
in first call of DirectSoundDevice_Create()?





More information about the wine-devel mailing list