Address Sanitizer(ASan)是一个快速的内存错误检测工具。
编译时加上-fsanitize=address -fno-omit-frame-pointer的选项
参考:https://www.jianshu.com/p/3a2df9b7c353
https://www.cnblogs.com/tongyishu/p/12597615.html
其他工具:
valgrind
mtrace
dmalloc
ccmalloc
memwatch
debug_new
用backtrace()调试coredump问题
参考:https://www.jianshu.com/p/8eac340f1760
网友评论