I'm programming using Visual Studio 2005 with Intel's Cilk SDK installed and learned there were some bad writing/reading happening at some specific memory locations, such as 0x00254c0( I can't remember the exact location, this is only an example). I have no idea what is going on at those locations and it also seems that I cannot assign pointers to these locations directly. Even if I can, the only information I get will be the value stored at these locations instead of the name of the actual variables affected. So any idea about how to debug such problems?

Thanks in advance.

Use a debugger, and set up a data access breakpoint on the address in question.

It will break whenever that location is read or written.

you are facing problem of memory corruption, problems can be:-
1) it may be array bound raed. (reading beyond buffer limit)
2) it may be array bound write. (writing beyond buffer limit)
3) it may be accessing free location.

One method to debug such code is by doing code review for above conditions and another process is to use automted tools for detecting such problems.

Some tools for detecting memory corruption are :-
1) raional purifier
2) dev partner.
3) intel inspecter.

Edited 6 Years Ago by tajendra: n/a

you are facing problem of memory corruption, problems can be:-
1) it may be array bound raed. (reading beyond buffer limit)
2) it may be array bound write. (writing beyond buffer limit)
3) it may be accessing free location.

One method to debug such code is by doing code review for above conditions and another process is to use automted tools for detecting such problems.

Some tools for detecting memory corruption are :-
1) raional purifier
2) dev partner.
3) intel inspecter.

thanks, I'll look into your suggestions

This article has been dead for over six months. Start a new discussion instead.