首页 > 其他 > 详细

Xcode 7 调试野指针利器 Address sanitizer

时间:2016-05-07 08:34:56      阅读:266      评论:0      收藏:0      [点我收藏+]

什么是Address Sanitizer?

AddressSanitizer is a fast memory error detector. It consists of a compiler instrumentation module and a run-time library. The tool can detect the following types of bugs:

Out-of-bounds accesses to heap, stack and globals
Use-after-free
Use-after-return (to some extent)
Double-free, invalid free
Memory leaks (experimental)

总结来说:**用来解决内存问题的**。
当发生Crash时,打印这个Crash内存的使用记录。通过这个使用记录来调试Bug。

Xcode中如何使用到?

  1. 你需要安装了xcode7
  2. 在xcode7中打开设置。
    技术分享
  3. 发生Crash后,拷贝内存地址
    技术分享
  4. 选中内存查看选项:View Memory
    技术分享
  5. 输入刚才的内存地址
    技术分享
  6. 点开右边的列表,就能看到内存调用记录了。
    技术分享
  7. 根据记录解决问题去吧。

Xcode 7 调试野指针利器 Address sanitizer

原文:http://blog.csdn.net/suyumingxiangguan/article/details/51335184

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!