RE: Win32 DLL project randomly crashes after moving to VS2005
Hi Jon,
Have you found something when your program crashed with stack overflow
under the debugger?
Since your DLL project just upgraded to VS2005, is it possible that the new
VC2005 CRT libraries are incompatible with your graphic library?
Has anything changed in the way VS2005 deals with the stack?
VC2005 adds some news stuffs into the stack layout , it uses the /GS switch
(Buffer Security Check) provides a "speed bump," or cookie, between the
buffer and the return address. If an overflow writes over the return
address, it will have to overwrite the cookie put in between it and the
buffer, resulting in a new stack layout:
Function parameters
Function return address
Frame pointer
Cookie
Exception Handler frame
Locally declared variables and buffers
Callee save registers
This option is enabled by default in VC2005 project, you can try to shut
that option for a test (Project Properties | Code Generation | Buffer
Security Check --> No).
Thanks!
Best regards,
Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.