sanitizers README

The project's README from github.com/google/sanitizers. As one markdown file: README.md.

sanitizers (Archived)

This repository has been archived and is no longer actively maintained.

The Sanitizers repository, which includes AddressSanitizer, MemorySanitizer, ThreadSanitizer, LeakSanitizer, and more, is now archived. The core code for these sanitizers resides within the LLVM repository. This repository will be retained for archival purposes, providing access to historical documentation, bugfixes, and helper code.

Important: Please do not file new bug reports in this repository.

Where to Report Bugs:

Documentation (Archived):

Kernel Sanitizers (Archived Documentation):

Thank you for your understanding.

sanitizers (google/sanitizers)

Searching Database…

这是什么?一系列运行时检查工具,用于捕捉 C 和 C++ 代码中的内存错误和数据竞争:包括 AddressSanitizer、MemorySanitizer、ThreadSanitizer、LeakSanitizer 等。这个仓库是它们已归档的文档中心。
它是需要我从这里安装的工具,还是我编译器的一部分?是编译器的一部分:核心代码位于 LLVM 仓库(Clang)中,GCC 也自带了自己的移植版本,所以你可以通过 Clang、GCC、Xcode 或 Visual Studio 等工具链来使用这些 sanitizer。
那我该怎么开始在自己的代码上使用这些 sanitizer?不是通过这个仓库——它只用于归档保存:历史文档、错误修复和辅助代码。你需要用包含了所需 sanitizer 的编译器来构建你的程序。
这个项目还在积极维护吗?不——这个仓库已经归档,不再积极维护,新的 bug 报告也不要提交到这里。
这些工具实际上能检测出哪些类型的 bug?AddressSanitizer 检测内存地址访问问题,LeakSanitizer 发现内存泄漏,ThreadSanitizer 找出 C++ 和 Go 中的数据竞争和死锁,MemorySanitizer 捕捉未初始化内存的使用,UBSan 则标记未定义行为。
HWASAN 是什么?硬件辅助的 AddressSanitizer——AddressSanitizer 的一个较新变体,它依赖硬件支持,内存消耗比经典版本少得多。
Linux 内核本身有没有对应的 sanitizer?有——KASAN、KMSAN 和 KCSAN 把 AddressSanitizer、MemorySanitizer 和 ConcurrencySanitizer 风格的检查带入了内核,它们的相关文档也归档在这里。
如果我发现了一个 sanitizer 的 bug,应该去哪里报告?不是这里:运行时和插桩相关的 bug 提交到 LLVM Bug Tracker,GCC 移植版的问题提交到 GCC Bugzilla,内核 sanitizer 的问题走内核渠道,而 Xcode、Visual Studio 或 Android NDK 的问题则提交到相应厂商的跟踪系统。
Creator
google
Size
47.8 MB
Stars
12.5K
Updated
CommitOct 09
Age
12y
Commits · 90 Days