> I suppose there is a bug in mine applicaiton and some random bytes is
> written into stack memory (memory overflow).
>
> I found a tool to validate heap gflags.exe, but unfortunatelly it does not validate stack overflow problem.
>
> Is there any tool to help analysis the problem?
This one claims that it can do it (I haven't tried myself):
http://www.softwareverify.com/cpp/memory/index.html
Some other things you can try:
- /GS compiler option (should catch some stack corruptions)
- /RTC compiler option (the same)
- Tracing (if the application terminates because of stack corruption,
it will tell you what functions were called last and should be suspects)
- Data breakpoints, if you know which buffers you want to monitor

Signature
Oleg
[VC++ MVP http://www.debuginfo.com/]
Voronkov Konstantin - 20 Jun 2007 09:18 GMT
I see all tools to detect stack overruns need to rebuild application, I
though there is some magic tool which can detect stack overrun without
rebuild applicaiton, as possible for heap problems detection :-)
Thanks for you help,
Konstantin
>> I suppose there is a bug in mine applicaiton and some random bytes is
>> written into stack memory (memory overflow).
[quoted text clipped - 13 lines]
> it will tell you what functions were called last and should be suspects)
> - Data breakpoints, if you know which buffers you want to monitor