address-sanitizer

Detect memory corruption faults in C/C++ binaries with AddressSanitizer.

Updated May 2, 2026
One-click install
npx skills add https://github.com/ayehiaa/my-travel-assistant --skill address-sanitizer-ayehiaa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: address-sanitizer
Source: https://github.com/ayehiaa/my-travel-assistant/tree/main/.agents/skills/address-sanitizer
Command: npx skills add https://github.com/ayehiaa/my-travel-assistant --skill address-sanitizer-ayehiaa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AddressSanitizer (ASan) helps you detect hard-to-find memory corruption bugs like buffer overflows and use-after-free errors during testing, so crashes become actionable reports instead of mysteries.

Core Features & Use Cases

  • Runtime memory error detection for fuzzing: Instruments C/C++ (and some Rust unsafe/FFI paths) to catch illegal memory accesses as they happen.
  • Detailed crash diagnostics: Produces stack traces plus allocation/deallocation context to speed up root-cause analysis.
  • Fuzzer-focused configuration: Supports common fuzzing workflows (libFuzzer, AFL++, cargo-fuzz, honggfuzz) including practical knobs like verbosity and leak detection.

Use case: You run a fuzz target against a C parser and it occasionally crashes; ASan turns that into a precise report (error type, faulting instruction, and relevant allocation history), letting you fix the vulnerability faster.

Quick Start

Compile your program (or fuzz target) with address instrumentation, then run it with ASAN_OPTIONS set to enable useful diagnostics and (optionally) disable leak detection during fuzzing.

Frequently Asked Questions about address-sanitizer

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

FAQPage Schema
How do I detect memory corruption bugs like buffer overflows during C++ fuzzing?

AddressSanitizer instruments C/C++ binaries compiled with -fsanitize=address to detect memory corruption faults like buffer overflows during fuzzing, producing detailed crash reports with stack traces and allocation context for faster root-cause analysis.

What is AddressSanitizer and how does it catch use-after-free errors?

AddressSanitizer is a runtime memory error detector that instruments binaries to catch use-after-free errors and illegal memory accesses as they happen, turning mysterious crashes into actionable diagnostics with faulting instructions and allocation history.

Can I use AddressSanitizer with Rust unsafe and FFI code paths?

Yes, AddressSanitizer applies to unsafe and FFI-heavy Rust paths where memory safety violations may occur, instrumenting the compiled binaries to detect illegal memory accesses during testing and fuzzing runs.

How do I configure ASAN_OPTIONS for fuzzing workflows with libFuzzer or AFL++?

You configure ASAN_OPTIONS environment variables to control diagnostics like verbosity, abort behavior, and leak detection during fuzzing, accommodating ASan's virtual memory needs across fuzzers like libFuzzer, AFL++, cargo-fuzz, and honggfuzz.

Why does my fuzzing target crash with memory errors and no useful diagnostics?

Without AddressSanitizer instrumentation, memory corruption faults produce mysterious crashes. Compiling with -fsanitize=address enables detailed crash diagnostics including error type, faulting instruction, and relevant allocation history for faster vulnerability fixes.