Finding cause of heap corruption

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Wed May 22 10:32:17 CDT 2002


>>>>> "Uwe" == Uwe Bonnes <bon at elektron.ikp.physik.tu-darmstadt.de> writes:


    Uwe> "invalid in-use arena magic" is an indicator for a corrupy
    Uwe> heap. Right?

    Uwe> On each RtlAllocateHeap(), the heap is checked. As the call to
    Uwe> RtlAllocateHeap() on line 133196 succeeds, the trashing must have
    Uwe> happend between line 133201 and 133203. Right?

Looking I thinks we have some problem somewhere. Even running calc.exe on a
clean tree I get 
( wine /dosc/win95/calc.exe  --debugmsg +relay,+snoop,+heap,+bitmap,+dib,+x11drv,+bitblt,+cursor > & /tmp/wine.debug"):

    3729 0806f2a8:Call x11drv.SetDIBits(403788d8,00000054,00000000,00000020,40809ed4,4037ae50,00000000) ret=40713100
    3730 trace:heap:RtlAllocateHeap (40350000,00000002,00000018): returning 4037af08
    3731 trace:x11drv:X11DRV_CreateBitmap (00000054) 32x32 1 bpp
    3732 trace:bitmap:X11DRV_DIB_SetImageBits Dib: depth=1 r=0 g=0 b=0
    3733 trace:bitmap:X11DRV_DIB_SetImageBits Bmp: depth=1/1 r=ff0000 g=ff00 b=ff
    3734 trace:bitmap:X11DRV_DIB_SetImageBits XPutImage(46137354,0x8074d80,0x807ea68,0,0,0,0,32,32)
    3735 trace:heap:RtlFreeHeap (40350000,00000002,4037af08): returning TRUE
    3736 0806f2a8:Ret  x11drv.SetDIBits() retval=00000020 ret=40713100
    3737 trace:heap:RtlFreeHeap (40350000,00000002,4037ae50): returning TRUE
    3738 trace:heap:RtlAllocateHeap (40350000,00000002,00000120): returning 4037af08
    3739 trace:bitmap:GetBitmapBits (00000054, 128, 0x4037af14) 32x32 2 colors fetched height: 32
    3740 trace:bitmap:GetBitmapBits Calling device specific BitmapBits
    3741 0806f2a8:Call x11drv.BitmapBits(00000054,4037af14,00000080,00000002) ret=4070cd33
    3742 trace:x11drv:X11DRV_GetBitmapBits (bmp=0x4037aec8, buffer=0x4037af14, count=0x80)
    3743 0806f2a8:Ret  x11drv.BitmapBits() retval=00000080 ret=4070cd33
    3744 trace:bitmap:GetBitmapBits (00000050, 128, 0x4037af94) 32x32 2 colors fetched height: 32
    3745 trace:bitmap:GetBitmapBits Calling device specific BitmapBits
    3746 0806f2a8:Call x11drv.BitmapBits(00000050,4037af94,00000080,00000002) ret=4070cd33
    3747 trace:x11drv:X11DRV_GetBitmapBits (bmp=0x4037ae88, buffer=0x4037af94, count=0x80)
    3748 0806f2a8:Ret  x11drv.BitmapBits() retval=00000080 ret=4070cd33
    3749 0806f2a8:Call x11drv.DeleteObject(00000054) ret=4070d0a1
    3750 0806f2a8:Ret  x11drv.DeleteObject() retval=00000001 ret=4070d0a1
    3751 trace:heap:RtlFreeHeap (40350000,00000002,4037aec8): returning TRUE
    3752 0806f2a8:Call x11drv.DeleteObject(00000050) ret=4070d0a1
    3753 0806f2a8:Ret  x11drv.DeleteObject() retval=00000001 ret=4070d0a1
    3754 trace:heap:RtlFreeHeap (40350000,00000002,4037ae88): returning TRUE
    3755 trace:heap:RtlAllocateHeap (40350000,00000002,00000018): returning 4037ae50
    3756 warn:heap:HEAP_IsRealArena Heap 0x40ba0000: block 0x40790a42 is not inside heap
                                                                      ^^^^^^^^^^^^^^^^^^ 

Thanks for any help.

-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------



More information about the wine-devel mailing list