clang ThreadSanitizer AddressSanitizer MemorySanitizer
来源:互联网 发布:json字符串转为map 编辑:程序博客网 时间:2024/06/16 12:30
Thread-sanitizer
=======ThreadSanitizer (aka TSan) is a data race detector for C/C++. Data races are one of the most common and hardest to debug types of bugs in concurrent systems.
A data race occurs when two threads access the same variable concurrently and at least one of the accesses is write. C++11 standard officially bans data races as undefined behavior.
Address-Sanitizer
=======
AddressSanitizer (aka ASan) is a memory error detector for C/C++. It finds:
- Use after free (dangling pointer dereference)
- Heap buffer overflow
- Stack buffer overflow
- Global buffer overflow
- Use after return
- Initialization order bugs
In order to use AddressSanitizer you will need to compile and link your program using clang with the -fsanitize=address switch.
To get a reasonable performance add -O1 or higher.
To get nicer stack traces in error messages add -fno-omit-frame-pointer.
Memory-Sanitizer
=======
MemorySanitizer (MSan) is a detector of uninitialized memory reads in C/C++ programs.
Uninitialized values occur when stack- or heap-allocated memory is read before it is written. MSan detects cases where such values affect program execution.
MemorySanitizer is bit-exact: it can track uninitialized bits in a bitfield. It will tolerate copying of uninitialized memory, and also simple logic and arithmetic operations with it. In general, MemorySanitizer silently tracks the spread of uninitialized data in memory, and reports a warning when a code branch is taken (or not taken) depending on an uninitialized value.
**Ref:**
[ThreadSanitizer](https://code.google.com/p/thread-sanitizer/)
[AddressSanitizer](https://code.google.com/p/address-sanitizer/)
[MemorySanitizer](https://code.google.com/p/memory-sanitizer/)
阅读全文
0 0
- clang ThreadSanitizer AddressSanitizer MemorySanitizer
- ThreadSanitizer AddressSanitizer MemorySanitizer
- ThreadSanitizer
- AddressSanitizer
- 内存问题的排查工具和方法– Clang的AddressSanitizer
- 内存问题的排查工具和方法– Clang的AddressSanitizer
- 内存问题的排查工具和方法– Clang的AddressSanitizer
- clang
- Clang
- clang
- clang
- clang
- 内存检测工具-addressSanitizer
- AddressSanitizer 内存检测工具
- AddressSanitizer使用记录
- AddressSanitizer算法及源码解析
- 印象Clang
- clang complete
- eclipse启动报.metadata\.log问题
- list和set
- 常用正则表达式
- Linux网络编程——tcp并发服务器(epoll实现)
- 监控系统cat安装和配置
- clang ThreadSanitizer AddressSanitizer MemorySanitizer
- ConfigReader(十七)—— ReadGuideManagerTaskConfig
- [收藏系列]从开发到部署会用到的 Docker 命令
- grep用法
- 故障:使用Struts2框架,表单提交后,抛异常,得不到自己想要的回复。
- activiti实战六(待办流程)
- Office 使用心得
- 基于jmeter和shell的接口性能自动化
- 什么是存储引擎以及不同存储引擎特点