美文网首页
Address Sanitizer

Address Sanitizer

作者: moontoby | 来源:发表于2015-07-09 13:20 被阅读0次

    1.only one runtime bug-finding tool can use on iOS

    2.what can do:  use after free, user after return, heap/stack buffer overflow,global variable overflow and overflows in C++ containers

    3.how to use:

    Xcode: edit scheme -> select task -> diagnostics -> check Enable Address Sanitizer checkbox

    commandLine: xcodebuild -shceme "target" test -enableAddressSanitizer YES

    4.原理 在需要检测的内存区域单元(可单独访问的内存区域)前后增加poisoned memory,缺点是会带来x2~x5的性能消耗

    read more:

    mikes:Address Sanitizer

    WWDC Video for Address Sanitizer

    相关文章

      网友评论

          本文标题:Address Sanitizer

          本文链接:https://www.haomeiwen.com/subject/yyxuqttx.html