Is there a way to log when a particular memory location gets written and by which function?
- by rusbi
I'm having a bug in my c++ program which happens very rarely but crashes my program. It's seems I have some buffer overflow problem or something similar. I find that these types of bug are most difficult to find.
My program always crashes because of the same corrupted memory location. I'm wondering if there is some debugging tool which could detect when a particular memory location get written to and logs the function which does it.
I'm using VLD (visual leak detector) 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.