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-code

Installs 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

Recommended

More Debugging
1oracle avatarnetsuite-sdf-project-documentationoracle/netsuite-suitecloud-sdkGenerate enterprise-grade documentation for NetSuite SDF projects. Analyze scripts, object XML files, `manifest.xml`, and SuiteQL queries to produce README.md, 895skills.sh installs
2mindrally avatarseo-best-practicesmindrally/skillsApply SEO best practices for web applications including metadata, performance optimization, and search engine optimization techniques.887skills.sh installs
3pulumi avatarprovider-upgradepulumi/agent-skillsUpgrade any Pulumi provider to a newer version and reconcile the resulting diff. Use when users want to upgrade or update a provider (including editing package.885skills.sh installs
4workos avatarworkos-widgetsworkos/skillsUse when the user is implementing, embedding, or debugging a WorkOS Widget — specifically the User Management, User Profile, Admin Portal SSO Connection, or Adm885skills.sh installs
5mblode avataragents-mdmblode/agent-skillsAudits, scores, and refactors AGENTS.md and CLAUDE.md agent instruction files using execution-first standards: working commands, real-failure gotchas, signal-to884skills.sh installs
6vercel-labs avatard3kvercel-labs/dev3000Use when the user asks to use d3k, run/dev/test/debug a web project with d3k, or reproduce a browser issue. Own the runtime: reuse or background-start d3k non-i877skills.sh installs