
Sanitizers
Covers the practical mechanics of enabling and interpreting AddressSanitizer, UBSan, ThreadSanitizer, MemorySanitizer, and LeakSanitizer in GCC and Clang. Shows you which sanitizer matches which bug class, the actual compiler flags, how to read stack traces from reports, and how to combine ASan with UBSan without breaking things. Includes runtime options via ASAN_OPTIONS, suppression files for false positives, and CMake snippets for CI integration. The decision tree at the top saves time when you just need to know whether to reach for ASan or TSan. Most useful when you have a reproducer and need to instrument the build correctly on the first try.
- skills.sh installs
- 895
- GitHub stars
- 279
- last updated
- Aug 21, 2026
Install
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill sanitizers --agent claude-codeInstalls into .claude/skills of the current project.
Files
Sanitizers
Purpose
Guide agents through choosing, enabling, and interpreting compiler runtime sanitizers for finding memory errors, undefined behaviour, data races, and memory leaks.
Triggers
- "My program has a memory error — which sanitizer do I use?"
- "How do I enable ASan?"
- "How do I interpret an ASan/UBSan/TSan report?"
- "ASan says heap-buffer-overflow — what does that mean?"
- "How do I suppress false positives in sanitizers?"
- "Can I use sanitizers in CI?"
Workflow
1. Decision tree: which sanitizer?
Bug class?
├── Memory OOB, use-after-free, double-free → AddressSanitizer (ASan)
├── Stack OOB, global OOB → ASan (all three covered)
├── Uninitialised reads → MemorySanitizer (MSan, Clang only, requires all-clang build)
├── Undefined behaviour (int overflow, null deref, bad cast) → UBSan
├── Data races (multi-thread) → ThreadSanitizer (TSan)
├── Memory leaks only → LeakSanitizer (LSan, standalone or via ASan)
└── Multiple classes → ASan + UBSan (common combo); cannot combine with TSan or MSan
2. AddressSanitizer (ASan)
Sponsors
Details
- Repository
- github.com/mohitmishra786/low-level-dev-skills
- Category
- Debugging
- First seen
- Jun 3, 2026
More from mohitmishra786/low-level-dev-skills
All 54- Core Dumps828
- Linux Perf814
- Clang789
- Cross Gcc742
- Gcc741
- Valgrind740
- Flamegraphs728
- Assembly X86724
- Strace Ltrace711
- Cpu Cache Opt709
- Assembly Arm707
- Lldb703
- Elf Inspection702
- Simd Intrinsics701
- Make697
- Memory Model693
- Freertos691
- Linux Kernel Modules689
- Ninja681
- Heaptrack676
- Rust Profiling673
- Ebpf672
- Msvc Cl671
- Fuzzing670