Ivan
Mon Jan 07 15:16:37 CST 2008
Before going for external tools, I would recomend enabling
Full-PageHeap on the executable image, to catch the heap corruption
as soon as possible.
Full-PageHeap can be enabled, amond other methods with
gflags.exe -p /enable <imagename.exe> /full
Support for enabling runtime instrumentation and integrated
debugging in devenv.exe is available starting VS2005
in the High-End SKUs (the team-architect edition, IIRC).
If this is not viable, the windbg//cdb/ntsd have debugging support
for PageHeap via the `!heap` debugger extension.
Chapter 5 and 6 of this book
http://www.amazon.com/Advanced-Debugging-Addison-Wesley-Microsoft-Technology/dp/0321374460/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1199740546&sr=8-1
are devoted to explain the techniques in great details
--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Alexander Nickolov" <agnickolov@mvps.org> wrote in message
news:OMgZRJVUIHA.5164@TK2MSFTNGP03.phx.gbl...
>A tool like BoundsChecker, Insure++ or Purify is indispensable
> in this situation. Note you can use BoundsChecker now without
> code instrumentation and the slowdown is not nearly as dramatic
> (it's more like 3-6 times as opposed to 50-100 times slower).
>
> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD
> email: agnickolov@mvps.org
> MVP VC FAQ:
http://vcfaq.mvps.org
> =====================================
>
> "Nathan Mates" <nathan@visi.com> wrote in message
> news:13o4a82inpu8420@corp.supernews.com...
>> In article <uiO8PVSUIHA.1212@TK2MSFTNGP05.phx.gbl>, Jack <jl@knight.com>
>> wrote:
>>>I am tracking an error of my application. I've got a heap or stack
>>>corruption near m_finfo...
>>
>> If you're using the debug version of the CRT, you can ask that to
>> check if your heap's corrupted. Look at
>>
http://msdn2.microsoft.com/en-us/library/e73x0s4b(VS.71).aspx and
>> related pages for more info. If you have a repeatable crash, then
>> sprinkle some calls to _CrtCheckMemory() throughout.
>>
>> Some apps like Boundschecker (see
>>
http://www.compuware.com/products/devpartner/visualc.htm ) may be able
>> to automate some of the checks for heap corruption. It's been years
>> since I used that program, and when it worked, it worked well. The
>> downsides were (1) it slows application execution down to a crawl when
>> applied, and (2) it was fairly pricey. Not sure if either/both of
>> those complaints have been fixed.
>>
>> Nathan Mates
>> --
>> <*> Nathan Mates - personal webpage
http://www.visi.com/~nathan/
>> # Programmer at Pandemic Studios --
http://www.pandemicstudios.com/
>> # NOT speaking for Pandemic Studios. "Care not what the neighbors
>> # think. What are the facts, and to how many decimal places?" -R.A.
>> Heinlein
>
>