Thanks Henri... I think i got "heap headache" :-/
* Can i make assumption, that log produced by wine is not buffered anywhere and is written to console sequentially and immediately when that event happened? (in other words log output doesn't outrun each other lines)
* Is HEAP_ValidateInUseArena called automatically when HeapAlloc() or HeapFree() is called? Or where it comes from in the log?
* If i have a log:
0018:Call ntdll.RtlAllocateHeap(04df4000,00000000,00002813) ret=78134d83 0022:trace:heap:RtlFreeHeap (0x110000,70000062,0x1f8aa0): returning TRUE 0022:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7e1de8e8 0022:Call user32.WindowFromDC(0000053c) ret=7e101ee7 0009:err:heap:HEAP_ValidateInUseArena Heap 0x110000: block 0x190f3468 tail overwritten at 0x190f346d (byte 0/19 == 0x8b) 0018:trace:heap:RtlAllocateHeap (0x4df4000,70000062,00002813): returning 0x4e53a08 0018:Ret ntdll.RtlAllocateHeap() retval=04e53a08 ret=78134d83 0009:trace:heap:RtlAllocateHeap (0x110000,70000062,00000100): returning 0x191d9648 0018:Call ntdll.RtlAllocateHeap(04df4000,00000000,00001013) ret=78134d83 0022:err:heap:HEAP_ValidateInUseArena Heap 0x110000: block 0x190f3468 tail overwritten at 0x190f346d (byte 0/19 == 0x8b) 0022:trace:heap:RtlAllocateHeap (0x110000,7000006a,00000040): returning 0x191d9758
I see corruption "0009:err:heap:HEAP_ValidateInUseArena..." which is caused by just calling the WindowFromDC()?? Otherwise two line above the WindowFromDC() would "0022:trace:heap:RtlFreeHeap" complained about corruption, because that FreeHeap has same heap handle (0x110000) like complaining HEAP_ValidateInUseArena.