Sunday, May 1, 2011

Are there any tools to detect buffer overflow on Visual C++ 6.0?

I've been having crash problems due to heap problems, so I guess a buffer overflow is happening somewhere. How do I detect it?

From stackoverflow
  • I use Compuware BoundsChecker as a tool for error detection in VC6. It can pick up buffer overruns.

    You can also try PageHeap, a tool for windows.

    Rodrigo : I had some problems trying to use PageHeap, this question defines them: http://stackoverflow.com/questions/781821/debug-visual-c-memory-allocation-problems Could you provide more info on how to use it?
  • I use Rational Purify for this.

  • You can use the VC debug heap: http://msdn.microsoft.com/en-us/library/974tc9t1.aspx

    Most if not all of the stuff in crtdbg.h is also supported in VC6.

  • I got good results when simply inserting _heapchk() Windows API function on some places and hunt the error (a access to index -1 to an array in my case).

0 comments:

Post a Comment