address-sanitizer

Detect memory errors in C/C++ and Rust code during fuzzing and testing.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/keremtoker468-dotcom/restoran --skill address-sanitizer-keremtoker468-dotcom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: address-sanitizer
Source: https://github.com/keremtoker468-dotcom/restoran/tree/main/.claude/skills/address-sanitizer
Command: npx skills add https://github.com/keremtoker468-dotcom/restoran --skill address-sanitizer-keremtoker468-dotcom

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill 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 during testing.
  • Fuzzing Integration: Essential for effective fuzzing of C/C++ and Rust code.
  • Use Case: When fuzzing a network service written in C, use this Skill to compile the service with AddressSanitizer enabled to catch any memory safety issues that the fuzzer might trigger.

Quick Start

Compile your C++ program with AddressSanitizer enabled using the command: clang++ -fsanitize=address -g your_program.cpp -o your_program.

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 in C++ code, compile your program with AddressSanitizer using the clang++ -fsanitize=address -g flag. This instrumentation identifies critical memory corruption bugs like buffer overflows and use-after-free during testing and fuzzing.

What is AddressSanitizer used for when testing C or Rust code?

AddressSanitizer is used to detect memory errors in C/C++ and Rust code with unsafe blocks. It finds critical memory corruption bugs like double-free, use-after-free, and buffer overflows during testing to prevent crashes and security vulnerabilities.

Can I use AddressSanitizer with Rust code containing unsafe blocks?

Yes, AddressSanitizer applies to Rust code containing unsafe blocks. By compiling with the -fsanitize=address flag, you can instrument the code to catch memory safety issues like buffer overflows that might otherwise go undetected during standard testing.

Why do I need AddressSanitizer enabled for fuzzing C/C++ programs?

You need AddressSanitizer enabled for fuzzing C/C++ programs because it is essential for effective fuzzing. It catches memory safety issues triggered by the fuzzer, identifying buffer overflows and use-after-free bugs that would otherwise cause crashes or security vulnerabilities.

What compile flags are required to find use-after-free bugs in C++?

To find use-after-free bugs in C++, you must use compile-time instrumentation with the -fsanitize=address flag, typically paired with -g for debug symbols. This enables AddressSanitizer to detect memory errors during testing.