http://bugs.winehq.org/show_bug.cgi?id=10186
Summary: Scary heap warnings in ole32 tests Product: Wine Version: CVS/GIT Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: wine-ole AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
Doing cd dlls/ole32/tests rm *.ok export WINEDEBUG=warn+heap make -k test yields a couple scary heap warnings. In particular,
../../../tools/runtest -P wine -M ole32.dll -T ../../.. -p ole32_test.exe.so hglobalstream.c && touch hglobalstream.ok warn:heap:GlobalLock invalid handle 0x125852 (Magic: 0x0098)
../../../tools/runtest -P wine -M ole32.dll -T ../../.. -p ole32_test.exe.so moniker.c warn:heap:HEAP_ValidateInUseArena Heap 0x110000: unaligned arena pointer 0x12ba7c warn:heap:HEAP_ValidateInUseArena Heap 0x110000: unaligned arena pointer 0x12bafc
In tests/hglobalstream.c near line 286, there is the code hr = CreateStreamOnHGlobal(hglobal, FALSE, &pStream); ... GlobalFree(hglobal); ... hr = IStream_Read(pStream, buffer, sizeof(buffer), &read); and the IStream_Read is what triggers the invalid handle warning. The test code seems quite intentional, and the test passes on wine; is the warning spurious?
In tests/moniker.c, there's a double release of a pointer at line 937, and removing one of them makes one warning go away; is this a typo, or intended? IEnumMoniker_Release(spEM1); IEnumMoniker_Release(spEM1);