I have a bug which happens very rarely but crashes my C++ program. It's seems I have a buffer overflow problem or something similar. I find that these types of bug are the most difficult to diagnose.
My program always crashes because of the same corrupted memory location. Is there some debugging tool which could detect when a particular memory location get written to and logs the function which does it?
I'm using Visual Leak Detector (VLD) for my memory leak hunting and it works great. It substitutes the original mallocs which its own and logs every allocation. I was wondering if there is something similar for memory?
I know that something like that would cripple a program, but it could be really helpful.
I'm using Visual Studio 2008.