The stack 'CSTACK' is filled to 100% (4096 bytes used out of 4096) 错误解决
2012-03-25 05:25
627 查看
今天调个程序,出现这个错误 The stack 'CSTACK' is filled to 100% (4096 bytes used out of 4096) 一开始以为堆栈设小了,一直增大堆栈大小也没用。 纠结了好久。 后来在网上搜到一段有用的资料。。。 关键字 总之这是一个数组越界问题,只要找出越界的数组,然后问题就解决了。。 所谓堆栈检查就是在初始化的时候把栈里面的数据都写成某个值,比如0xcc 然后从头向后开始查,比如栈顶在0x20000800,栈大小为0x400,则从0x20000400开始检查是不是有数据不为0xcc 如果你在0x20000400处写一个非0xcc的值,那堆栈检查会马上报一个 "The stack 'CSTACK' is filled to 100% (4096 bytes used out of 4096). The warning threshold is set to 90%. "的错误 由于IAR的静态空间在栈的前面,如果申明一个全局的数组 u8 temp[0x400];假设其放在 [0x20000000, 0x20000400)中,如果试图这样赋值 i = 0x400; temp = 1; 那么实际上数据写在了栈的底部,IAR的堆栈检查就会报如上错误 你可以检查一下你程序中是不是有数据访问越界的情况 传送门 http://www.ourdev.cn/forum.php?mod=viewthread&tid=3477889 |
相关文章推荐
- The stack 'CSTACK' is filled to 92% (368 bytes used out of 400). The warning threshold is set to 90.%
- IAR调试时出现“The stack 'CSTACK' is filled to 100%”问题及解决办法
- Please read "Security" section of the manual to find out how to run mysqld as root!错误解决
- 错误整理:Unable to add module to the current project as it is not of packaging type 'pom'
- 怎样解决错误:error: Error: No resource found that matches the given name (at 'layout_toLeftOf' with value
- Android 解决adb server is out of date. killing... ADB server didn't ACK * failed to star
- android Failed to install *.apk on device 'emulator-5554' timeout 或者 the user data image is used解决办法
- Xcode The identity used to sign the executable is no longer valid. 错误解决
- Please read "Security" section of the manual to find out how to run mysqld as root!错误解决
- 解决MFC运行时错误:“Stack around the variable 'dlg' was corrupted. ”
- MyEclipse导出项目时发生的错误:Resource is out of sync with the file system解决办法
- 解决 C++错误 error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class CString' (or there is no
- adb server is out of date. killing... ADB server didn't ACK解决方法
- How To Fix Xcode's "used as the name of&
- 解决 deployment is out of dete due to changes in the underlying project contents youll need to
- The connection to adb is down, and a severe error has occured.(解决adb server didn't ACK问题)
- 'Operation is not valid due to the current state of the object' error during postback
- C中“fatal error C1075: end of file found before the left brace '{'”错误的几种可能解决方法
- 解决PHP date调用警告:It is not safe to rely on the system's timezone settings
- this class is not key value coding-compliant for the key buttonPressed.' 错误解决方式