Agent skill · AI & Agents

address-sanitizer

AddressSanitizer detects memory errors during fuzzing. Use when fuzzing C/C++ code to find buffer overflows and use-after-free bugs.

trailofbitsgithub.com/trailofbitsGitHub ↗
claude-codeCC-BY-SA-4.0
Install
npx skills add trailofbits/skills --skill address-sanitizer --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 11 KB
Bundled scripts: none
Path: plugins/testing-handbook-skills/skills/address-sanitizer/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 6,426
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# AddressSanitizer (ASan) AddressSanitizer (ASan) is a widely adopted memory error detection tool used extensively during software testing, particularly fuzzing. It helps detect memory corruption bugs that might otherwise go unnoticed, such as buffer overflows, use-after-free errors, and other memory safety violations. ## Overview ASan is a standard practice in fuzzing due to its effectiveness in identifying memory vulnerabilities. It instruments code at compile time to track memory allocations and accesses, detecting illegal operations at runtime. ### Key Concepts | Concept | Description | |---------|-------------| | Instrumentation | ASan adds runtime checks to memory operations during compilation | | Shadow Memory | Maps 20TB of virtual memory to track allocation state | | Performance Cost | Approximately 2-4x slowdown compared to non-instrumented code | | Detection Scope | Finds buffer overflows, use-after-free, double-free, and memory leaks | ## When to Apply **Apply this technique when:** - Fuzzing C/C++ code for memory safety vulnerabilities - Testing Rust code with unsafe blocks - Debugging crashes related to memory corruption - Running unit tests where memory errors are su

What's inside
Steps it walks through
  1. Overview
  2. Key Concepts
  3. When to Apply
  4. Quick Reference
  5. Step-by-Step
  6. Step 1: Compile with ASan
  7. Step 2: Configure ASan Options
  8. Step 3: Run Your Program
  9. Step 4: Adjust Fuzzer Memory Limits
  10. Common Patterns
  11. Pattern: Basic ASan Integration
  12. Pattern: ASan with Unit Tests
  13. Advanced Usage
  14. Tips and Tricks
Ships with 2 files
  • agents/openai.yaml
  • assets/trail-of-bits-mark.svg
Commands it runs
clang -fsanitize=address -g -o my_program my_program.c
export ASAN_OPTIONS=verbosity=1:abort_on_error=1:detect_leaks=0
clang -o fuzz_target fuzz_target.c
clang -fsanitize=address -g -o fuzz_target fuzz_target.c
gcc -o test_suite test_suite.c -lcheck
gcc -fsanitize=address -g -o test_suite test_suite.c -lcheck
clang -fsanitize=address,undefined -g -o fuzz_target fuzz_target.c
afl-fuzz -m none -i input_dir -o output_dir ./fuzz
cargo fuzz run fuzz_target --sanitizer=address
honggfuzz -i input_dir -o output_dir -- ./fuzz_target_asan
More from skills
All skills →
About this skill
What does the address-sanitizer skill do?

AddressSanitizer detects memory errors during fuzzing. Use when fuzzing C/C++ code to find buffer overflows and use-after-free bugs.

How do I install it?

Run `npx skills add trailofbits/skills --skill address-sanitizer --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From trailofbits/skills, a repository with 6,426 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going