如何修复由于堆损坏而导致的错误
how to fix bug due to a heap corruption
当我的应用程序崩溃时,我有以下调用堆栈(通过MSVC210保存转储功能和winbdg在第二次使用k命令创建):
0012c720 7d684c89 0012c93c 7d656a16 063acab8 ntdll!DbgBreakPoint
0012c728 7d656a16 063acab8 0000035c 035f0000 ntdll!RtlpBreakPointHeap+0x28
0012c93c 7d685892 035f0000 50000161 0000035c ntdll!RtlAllocateHeapSlowly+0x231
0012c9b0 7d65695e 035f0000 50000161 0000035c ntdll!RtlDebugAllocateHeap+0xaf
0012cbcc 7d62ba89 035f0000 40000060 0000035c ntdll!RtlAllocateHeapSlowly+0x41
0012cdfc 10308343 035f0000 40000060 0000035c ntdll!RtlAllocateHeap+0xe9f
0012ce14 1031697c 0000035c c8fa7bd5 0012deb0 MSVCR100D!_heap_alloc_base+0x53
0012ce5c 1031671f 00000338 00000001 00000000 MSVCR100D!_nh_malloc_dbg+0x2dc
0012ce7c 103166cc 00000338 00000000 00000001 MSVCR100D!_nh_malloc_dbg+0x7f
0012cea4 10319c5b 00000338 00000000 00000001 MSVCR100D!_nh_malloc_dbg+0x2c
0012cec4 10307db1 00000338 04f26388 0012cfac MSVCR100D!malloc+0x1b
0012cee0 65302a58 00000338 c8876569 00000070 MSVCR100D!operator new+0x11
这似乎是由于堆损坏。
我不知道如何或什么寻找在我的代码修复错误..
有没有最好的方法来修复这个bug ?
Thanks to lot
堆损坏可能是由于许多原因造成的,很难通过代码分析来检测这样的代码。最好的方法是:
通过Valgrind或Rational Purifyplus或任何此类内存分析工具运行您的代码,它们将帮助您确定确切的错误并将其指出给您。
看一下:
如何调试堆损坏错误?
相关文章:
- gdb错误:Backtrace已停止:上一帧与此帧相同(堆栈已损坏?)
- 使用全局声明的向量时,C++双重释放错误/损坏
- 我可以写入关闭的套接字并强制纠正损坏的管道错误吗?
- C++程序错误:malloc():内存损坏
- 在C++中检测到堆损坏错误
- 在为 iOS 构建 aws-sdk-cpp 时,cmake 上的 CXX 编译器错误已损坏
- 双重释放或损坏(输出)和中止(核心转储)错误
- Dll中缺少什么(致命错误LNK1107:无效或损坏的文件:)
- AMQP-CPP:TCP 处理程序中的管道损坏错误
- 与强制转换相关的堆损坏错误
- 如何修复C ++中的"堆已损坏"错误?
- 双重释放或损坏错误(找不到错误?
- 使用线程和静音时,双免费或损坏(!prev)错误
- 对于我的类函数,我得到双重释放或损坏错误
- 排序程序的错误(检测到堆损坏)
- 正常块错误后检测到的堆损坏
- 为什么我的作业操作员给出了损坏错误
- 为什么 delete[] 会导致堆损坏错误
- OpenMP *** "..."中的错误:双重释放或损坏(快速顶部):[地址] ***
- 运行时检查失败#2 - 变量周围的堆栈'myArray'已损坏.- 似乎无法弄清楚如何删除此错误