http://bugs.winehq.org/show_bug.cgi?id=30860
Bug #: 30860 Summary: HeapValidate() reports incorrect results when running under Valgrind Product: Wine Version: 1.5.5 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: ntdll AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com Classification: Unclassified
When run under Valgrind, the program
#include <windows.h> #include <assert.h> int WINAPI WinMain(HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpCmdLine, int nShowCmd) { assert(HeapValidate(GetProcessHeap(), 0, 0)); }
fails the assertion, and the log shows
err:heap:HEAP_ValidateInUseArena Heap 0x7f000000: free block 0x7f000138 overwritten at 0x7f000138 by 0074006e
I think heap_set_debug_flags(), HEAP_ValidateInUseArena(), and probably others would need changes for this to work.