Is there a way to log when a particular memory location gets written and by which function?
Posted
by rusbi
on Stack Overflow
See other posts from Stack Overflow
or by rusbi
Published on 2010-03-31T13:55:23Z
Indexed on
2010/03/31
14:33 UTC
Read the original article
Hit count: 323
c++
|memory-corruption
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.
© Stack Overflow or respective owner