address-sanitizer

Detect memory errors in C/C++ code during fuzzing with compiler instrumentation.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/andrescardonas7/salchipapa-web --skill address-sanitizer-andrescardonas7
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: address-sanitizer
Source: https://github.com/andrescardonas7/salchipapa-web/tree/main/.cursor/skills/testing-handbook-skills/address-sanitizer
Command: npx skills add https://github.com/andrescardonas7/salchipapa-web --skill address-sanitizer-andrescardonas7

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This technique helps developers find critical memory errors like buffer overflows and use-after-free bugs in C/C++ code, preventing crashes and security vulnerabilities.

Core Features & Use Cases

  • Memory Error Detection: Identifies common memory corruption bugs.
  • Fuzzing Integration: Essential for effective fuzz testing of C/C++ and Rust code.
  • Use Case: When fuzzing a network service written in C, use AddressSanitizer to catch any buffer overflows that could lead to remote code execution.

Quick Start

Compile your C++ program with the -fsanitize=address flag.

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 errors like buffer overflows in C++ code?▼

To detect memory errors like buffer overflows in C++ code, compile your program using the `-fsanitize=address` flag. This instrumentation identifies memory corruption bugs and use-after-free violations during execution.

How does AddressSanitizer work with fuzz testing for C/C++?▼

AddressSanitizer integrates with fuzz testing by instrumenting compiled C/C++ code to catch memory safety violations dynamically. It exposes critical bugs like buffer overflows triggered by malformed inputs during fuzzing runs.

Can I use AddressSanitizer to find use-after-free bugs in C?▼

Yes, you can use AddressSanitizer to find use-after-free bugs in C. By compiling with specific sanitizer flags, the tool detects memory access violations that occur after memory has been deallocated.

Do I need to recompile my code to use AddressSanitizer?▼

Yes, you need to recompile your code to use AddressSanitizer because it requires compile-time instrumentation. You must add specific compiler flags to your build process to enable memory error detection.

What types of memory safety violations can AddressSanitizer identify?▼

AddressSanitizer can identify several memory safety violations including buffer overflows, use-after-free bugs, and other memory corruption errors. It prevents these issues from causing crashes and security vulnerabilities.