
Memory Read/write problem using vc++ 6.0
You've probably got some bugs in your program that were exposed by the
change in compiler from 5 to 6. Changes in stack layout and usage, for
example, can expose uninitialized variable type bugs, which may have been
working because some other function set the stack location of a local
variable to a working value but the new compiler arranges the locals
differently.
When we upgraded to VC6, we started seeing some new bugs in our builds that
didn't appear in previous versions. Since we archive all our builds we could
track them back to the switch in compilers, which usually points to hidden
bugs being exposed.
If you debug the release version you can usually find these problems
although it's hard work, but some of the compiler switches (/GZ) and tools
like BoundsChecker also help.
David
Quote:
> I was having the same problem with a program that I had written originally
> in MSVC++ 5. I made some changes and now used MSVC++ 6 SP3 and the
Netscape
> LDAP 3.0 API, it crashed at run time, so I went crazy trying to figure out
> what was happening with no luck and just got mad and recompiled with VC++
5
> and it runs fine. Unfortunately for me sometimes I just have to move on
> without ever really resolving the issue. Most likely I will have to use
> version 5 from now on, unless I can get this to work in version 6 my boss
> will flip out if I try to continue using MSVC++ 6