Address Sanitizer

Xcode7的 llvm和gcc中新增Address Sanitizer (ASan) ,它可以直接在编译的时候发现内存地址访问错误

gcc -fsanitize=address -ggdb -o test test.c

http://www.freebuf.com/news/83811.html