I've been having crash problems due to heap problems, so I guess a buffer overflow is happening somewhere. How do I detect it?
+3
A:
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.
Snazzer
2009-04-23 20:05:11
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?
Rodrigo
2009-04-23 20:18:40
+1
A:
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.
Michael Burr
2009-04-23 20:10:04
A:
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).
rstevens
2009-04-23 21:22:04