address-sanitizer

Enable AddressSanitizer to detect memory errors in C/C++ fuzz targets.

Updated Jan 17, 2026
One-click install
npx skills add https://github.com/mejango/juicy-vision --skill address-sanitizer-mejango
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: address-sanitizer
Source: https://github.com/mejango/juicy-vision/tree/main/.claude/plugins/testing-handbook-skills/skills/address-sanitizer
Command: npx skills add https://github.com/mejango/juicy-vision --skill address-sanitizer-mejango

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AddressSanitizer (ASan) detects memory safety errors in fuzzed C/C++ code, helping you find issues like buffer overflows and use-after-free before they crash production systems.

Core Features & Use Cases

  • Memory error detection: Instrumented builds catch runtime memory violations during fuzzing.
  • Crash diagnosis: Provides stack traces and allocation/deallocation traces to locate bugs quickly.
  • Cross-language fuzzing support: Useful for C/C++ projects and tests that interact with unsafe blocks or FFI.

Quick Start

Compile your C/C++ fuzz target with ASan enabled: clang -fsanitize=address -g -o fuzz_target fuzz_target.c Run the instrumented binary and review ASan reports: ./fuzz_target Optional: tune ASan behavior via environment variables, for example: ASAN_OPTIONS=verbosity=1:detect_leaks=1

Frequently Asked Questions about address-sanitizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect buffer overflows and use-after-free bugs during C/C++ fuzzing?

To detect memory errors during C/C++ fuzzing, compile your fuzz target with AddressSanitizer using the -fsanitize=address flag to catch runtime buffer overflows and use-after-free violations.

What compiler flags do I need to enable AddressSanitizer for memory error detection?

To enable AddressSanitizer for memory error detection, compile your code using clang or gcc with the -fsanitize=address and -g flags to generate an instrumented binary.

How do I configure ASan to detect memory leaks and provide stack traces?

You can configure ASan to detect memory leaks and provide stack traces by setting the ASAN_OPTIONS environment variable, such as ASAN_OPTIONS=verbosity=1:detect_leaks=1, before running your binary.

Does AddressSanitizer work with C/C++ projects that use FFI or unsafe blocks?

Yes, AddressSanitizer works with C/C++ projects that use FFI or unsafe blocks, catching memory safety errors across native codebases and unit tests that exercise memory unsafe patterns.

What compiler is required to run AddressSanitizer on fuzz targets?

Running AddressSanitizer on fuzz targets requires a compiler with sanitizer support, such as clang or gcc, to apply the necessary -fsanitize=address instrumentation to your code.