Resources | Resources |



Double Free Errors

When memory is unallocated a second time:

  1. A Visual Studio dialog shows the message SimTargetExecutor.exe has triggered a breakpoint.
  2. Press Break.
  3. From the Visual Studio menu, click Debug > Windows > Call Stack.

The call stack is shown. Line breaks have been added to the following example.

[Frames below may be incorrect and/or missing, 
    no symbols loaded for ntdll.dll]	
cht.dll1!dbg_Break()  Line 138 + 0x8 bytes	C
cht.dll1!HandleErrorReport(IHeap1Debugger * pif=0x041e5ed8,
    Heap1Error * pErr=0x0012e9e0)  Line 344	C
cht.dll1!CHTHeap1Debugger_ErrorReport(IHeap1Debugger * pif=0x041e5ed8,
    Heap1Error * pErr=0x0012e9e0)  Line 75 + 0xd bytes	C
a1Host.dll!h1_error_notify(const IHeap1DebugCtl * pHeap=0x00000000,
    int nErrorType=0, void * p=0x00000000, unsigned long n=6, int nErr=0)  Line 812 + 0xe bytes	C
a1Host.dll!heapOne_Realloc_Op(Heap1Operation * pOp=0x0012ea10)
    Line 4262 + 0x17 bytes	C
a1Host.dll!Heap1Op_Transaction(IHeap1Op * me=0x0418007c,
    Heap1Trans * pTrans=0x0012ea84)  Line 5306 + 0x16 bytes	C
BREWSim.dll1!MarkingHeap_Op_Central(MarkingHeap * me=0x04317f90,
    int nSize=0, void * * ppo=0x0012ead8,
    const char * cpszName=0x00000000, unsigned long dwFlags=7)
    Line 340 + 0x15 bytes	C
BREWSim.dll1!MarkingHeap_Op_ErrRealloc(MarkingHeap * me=0x04317f90,
    int nSize=0, void * * ppo=0x0012ead8)  Line 373 + 0x15 bytes	C
BREWSim.dll1!aee_free(void * p=0x04cb30a8)  Line 89 + 0x22 bytes	C
 >	HCDblFree.dll!TestFunction()  Line 313 + 0xf bytes	C
HCDblFree.dll!HCDblFree_HandleEvent(_HCDblFree * pMe=0x04f71a40,
    unsigned short eCode=256, unsigned short wParam=57394,
    unsigned long dwParam=0)  Line 289	C
HCDblFree.dll!AEEApplet_HandleEvent(IApplet * po=0x04f71a40,
    unsigned short evt=256, unsigned short wParam=57394,
    unsigned long dwParam=0)  Line 196 + 0x1a bytes	C
BREWSim.dll1!App_SendEvent(_AppContext * pac=0x04d530d8,
    unsigned short evt=256, unsigned short wp=57394,
    unsigned long dwp=0)  Line 9500 + 0x27 bytes	C
In the source window, the current step pointer will be pointing to the line in your code to be executed next.