title: How to access the full stack trace of mallocs in an MFC 8.0 application?
body: <p>I'm trying to find a memory leak in a windows MFC 8.0 application (Release build).</p>
  
  <p>After failing to show the full stack trace of allocations using WinDbg (or umdh) due to VC8 <a href="http://www.nynaeve.net/?p=209" rel="nofollow noreferrer">CRT's malloc problem with FPO</a>, I've tried to apply the solution proposed <a href="http://www.nynaeve.net/?p=209#comment-23545" rel="nofollow noreferrer">here</a> (i.e. using LeakDiag with DbgHlp StackWalk enabled) only to realize that LeakDiag does NOT generate a log file when monitoring the <em>C Runtime Allocator</em>, however, when monitoring the <em>Windows Heap Allocator</em> it does work, but again, the stack trace ends at the malloc call.</p>
  
  <p>Symbols are correctly configured, as I can see function names, filenames, lines, etc. in the file generated. </p>
  
  <p>Does anyone know why I can't log the <em>C Runtime Allocator</em>? and why I can't get a full stack trace even if I'm using the DbgHlp StackWalk API?</p>
  
  <p>I'll appreciate any hint you can provide.</p>
  
  <p><strong>Additional information:</strong></p>
  
  <p><em>How my stack traces look like:</em></p>
  
  <p>I've got this using WinDbg. The address is one reported by !heap -l as a leaked block.</p>
  
  <pre><code>0:000&gt; !heap -p -a 25b18400  
  address 25b18400 found in
  _HEAP @ 2a70000
    HEAP_ENTRY Size Prev Flags    UserPtr UserSize - state
      25b183f8 0008 0000  [07]   25b18400    00021 - (busy)
      Trace: 00a4
      7c97d6dc ntdll!RtlDebugAllocateHeap+0x000000e1
      7c959d18 ntdll!RtlAllocateHeapSlowly+0x00000044
      7c92b298 ntdll!RtlAllocateHeap+0x00000e64
      78134d83 MSVCR80!malloc+0x0000007a
  </code></pre>