如何调试'ESP的值没有保存跨函数调用'错误? [英] How to debug 'value of ESP was not saved across function call' error?
问题描述
在我的程序退出的罕见情况下,我得到一个ESP的值没有保存在函数调用错误。错误是非常随机和难以重现。
On rare occasions when my program exits, I get a "value of ESP has not been saved across a function call" error. The error is quite random and hard to reproduce.
如何调试此错误(VC ++ 2008)?它是多么苛刻,因为它只发生在关机?在发布模式下错误是否可见?
How do I debug this error (VC++ 2008)? How harsh it is, as it only occurs on shutdown? Is the error visible also in release mode?
推荐答案
这意味着你调用一个错误的调用约定当你声明一个函数指针不正确 - 或者有一些东西覆盖了堆栈时,会发生这种情况。
This means that either you call a function with a wrong calling convention - that often happens when you declare a function pointer improperly - or there's something overwriting the stack.
调试前面的函数检查什么函数导致这种情况。要调试后者寻找类似堆栈分配的缓冲区溢出。
To debug the former check what function causes this situation. To debug the latter look for thing like stack-allocated buffer overruns.
这篇关于如何调试'ESP的值没有保存跨函数调用'错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!