address-sanitizer

Detect memory safety errors in C/C++ fuzzing with AddressSanitizer instrumentation.

Updated Jul 10, 2025
One-click install
npx skills add https://github.com/Superlend/superloop-core-contracts --skill address-sanitizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: address-sanitizer
Source: https://github.com/Superlend/superloop-core-contracts/tree/main/.cursor/skills/testing-handbook-skills/skills/address-sanitizer
Command: npx skills add https://github.com/Superlend/superloop-core-contracts --skill address-sanitizer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AddressSanitizer detects memory safety violations during fuzzing, helping identify bugs that would otherwise go unnoticed.

Core Features & Use Cases

  • Memory-safety detection: Finds buffer overflows, use-after-free, and memory leaks in C/C++ fuzz targets.
  • Crash reproduction: Provides detailed reports and stack traces to reproduce defects.
  • Integration-friendly: Works with common fuzzing workflows by enabling -fsanitize=address during compilation.

Quick Start

Compile with AddressSanitizer enabled and run the fuzz target to observe memory-safety errors (e.g., clang -fsanitize=address -g -o fuzz fuzz_target.c; ./fuzz).

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 safety errors like buffer overflows during C/C++ fuzzing?

AddressSanitizer detects memory safety errors during C/C++ fuzzing by instrumenting code with -fsanitize=address. It identifies buffer overflows, use-after-free, and memory leaks across build configurations to catch bugs that would otherwise go unnoticed.

What compiler flags do I need to enable AddressSanitizer for my fuzz target?

To enable AddressSanitizer, you need a compiler with sanitizer support, such as Clang or GCC. Compile your fuzz target using the -fsanitize=address flag along with debugging flags like -g to enable runtime instrumentation.

Can I use AddressSanitizer to reproduce crashes and get stack traces for use-after-free bugs?

Yes, AddressSanitizer provides detailed reports and stack traces for crash reproduction. When memory safety violations like use-after-free occur during fuzzing, it outputs diagnostic information to help you pinpoint and reproduce the exact defects.

Does AddressSanitizer work with any build configuration for C/C++ fuzzing workflows?

AddressSanitizer works across different build configurations for C/C++ fuzzing workflows. However, it requires compatible build flags and a compiler that supports sanitizer instrumentation to function correctly during your fuzz testing.

Why should I use AddressSanitizer instead of standard fuzzing for finding memory leaks?

AddressSanitizer finds memory leaks and other memory safety violations that standard fuzzing often misses. By instrumenting your code at compile time, it provides detailed runtime detection and crash reports for hidden bugs.