[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75BEJWAZCV31NMAGK51WBVE":3,"skill-same:01M75BEJWAZCV31NMAGK51WBVE":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M75BEJWAZCV31NMAGK51WBVE","address-sanitizer",null,"AddressSanitizer detects memory errors during fuzzing. Use when fuzzing C\u002FC++ code to find buffer overflows and use-after-free bugs.","agisota\u002Fold-one","agisota","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121413592?v=4","01M75B4BRNT67EC1NDRT8QZEP2","01M75B4BS7QR9VP580MSCPTS3X",3,"MIT","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Faddress-sanitizer\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: address-sanitizer\ntype: technique\ndescription: >\n  AddressSanitizer detects memory errors during fuzzing.\n  Use when fuzzing C\u002FC++ code to find buffer overflows and use-after-free bugs.\n---\n\n# AddressSanitizer (ASan)\n\nAddressSanitizer (ASan) is a widely adopted memory error detection tool used extensively during software testing, particularly fuzzing. It helps detect memory corruption bugs that might otherwise go unnoticed, such as buffer overflows, use-after-free errors, and other memory safety violations.\n\n## Overview\n\nASan is a standard practice in fuzzing due to its effectiveness in identifying memory vulnerabilities. It instruments code at compile time to track memory allocations and accesses, detecting illegal operations at runtime.\n\n### Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Instrumentation | ASan adds runtime checks to memory operations during compilation |\n| Shadow Memory | Maps 20TB of virtual memory to track allocation state |\n| Performance Cost | Approximately 2-4x slowdown compared to non-instrumented code |\n| Detection Scope | Finds buffer overflows, use-after-free, double-free, and memory leaks |\n\n## When to Apply\n\n**Apply this technique when:**\n- Fuzzing C\u002FC++ code for memory safety vulnerabilities\n- Testing Rust code with unsafe blocks\n- Debugging crashes related to memory corruption\n- Running unit tests where memory errors are suspected\n\n**Skip this technique when:**\n- Running production code (ASan can reduce security)\n- Platform is Windows or macOS (limited ASan support)\n- Performance overhead is unacceptable for your use case\n- Fuzzing pure safe languages without FFI (e.g., pure Go, pure Java)\n\n## Quick Reference\n\n| Task | Command\u002FPattern |\n|------|-----------------|\n| Enable ASan (Clang\u002FGCC) | `-fsanitize=address` |\n| Enable verbosity | `ASAN_OPTIONS=verbosity=1` |\n| Disable leak detection | `ASAN_OPTIONS=detect_leaks=0` |\n| Force abort on error | `ASAN_OPTIONS=abort_on_error=1` |\n| Multiple options | `ASAN_OPTIONS=verbosity=1:abort_on_error=1` |\n\n## Step-by-Step\n\n### Step 1: Compile with ASan\n\nCompile and link your code with the `-fsanitize=address` flag:\n\n```bash\nclang -fsanitize=address -g -o my_program my_program.c\n```\n\nThe `-g` flag is recommended to get better stack traces when ASan detects errors.\n\n### Step 2: Configure ASan Options\n\nSet the `ASAN_OPTIONS` environment variable to configure ASan behavior:\n\n```bash\nexport ASAN_OPTIONS=verbosity=1:abort_on_error=1:detect_leaks=0\n```\n\n### Step 3: Run Your Program\n\nExecute the ASan-instrumented binary. When memory errors are detected, ASan will print detailed reports:\n\n```bash\n.\u002Fmy_program\n```\n\n### Step 4: Adjust Fuzzer Memory Limits\n\nASan requires approximately 20TB of virtual memory. Disable fuzzer memory restrictions:\n\n- libFuzzer: `-rss_limit_mb=0`\n- AFL++: `-m none`\n\n## Common Patterns\n\n### Pattern: Basic ASan Integration\n\n**Use Case:** Standard fuzzing setup with ASan\n\n**Before:**\n```bash\nclang -o fuzz_target fuzz_target.c\n.\u002Ffuzz_target\n```\n\n**After:**\n```bash\nclang -fsanitize=address -g -o fuzz_target fuzz_target.c\nASAN_OPTIONS=verbosity=1:abort_on_error=1 .\u002Ffuzz_target\n```\n\n### Pattern: ASan with Unit Tests\n\n**Use Case:** Enable ASan for unit test suite\n\n**Before:**\n```bash\ngcc -o test_suite test_suite.c -lcheck\n.\u002Ftest_suite\n```\n\n**After:**\n```bash\ngcc -fsanitize=address -g -o test_suite test_suite.c -lcheck\nASAN_OPTIONS=detect_leaks=1 .\u002Ftest_suite\n```\n\n## Advanced Usage\n\n### Tips and Tricks\n\n| Tip | Why It Helps |\n|-----|--------------|\n| Use `-g` flag | Provides detailed stack traces for debugging |\n| Set `verbosity=1` | Confirms ASan is enabled before program starts |\n| Disable leaks during fuzzing | Leak detection doesn't cause immediate crashes, clutters output |\n| Enable `abort_on_error=1` | Some fuzzers require `abort()` instead of `_exit()` |\n\n### Understanding ASan Reports\n\nWhen ASan detects a memory error, it prints a detailed report including:\n\n- **Error type**: Buffer overflow, use-after-free, etc.\n- **Stack trace**: Where the error occurred\n- **Allocation\u002Fdeallocation traces**: Where memory was allocated\u002Ffreed\n- **Memory map**: Shadow memory state around the error\n\nExample ASan report:\n```\n==12345==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300000eff4 at pc 0x00000048e6a3\nREAD of size 4 at 0x60300000eff4 thread T0\n    #0 0x48e6a2 in main \u002Fpath\u002Fto\u002Ffile.c:42\n```\n\n### Combining Sanitizers\n\nASan can be combined with other sanitizers for comprehensive detection:\n\n```bash\nclang -fsanitize=address,undefined -g -o fuzz_target fuzz_target.c\n```\n\n### Platform-Specific Considerations\n\n**Linux**: Full ASan support with best performance\n**macOS**: Limited support, some features may not work\n**Windows**: Experimental support, not recommended for production fuzzing\n\n## Anti-Patterns\n\n| Anti-Pattern | Problem | Correct Approach |\n|--------------|---------|------------------|\n| Using ASan in production | Can make applications less secure | Use ASan only for testing |\n| Not disabling memory limits | Fuzzer may kill process due to 20TB virtual memory | Set `-rss_limit_mb=0` or `-m none` |\n| Ignoring leak reports | Memory leaks indicate resource management issues | Review leak reports at end of fuzzing campaign |\n\n## Tool-Specific Guidance\n\n### libFuzzer\n\nCompile with both fuzzer and address sanitizer:\n\n```bash\nclang++ -fsanitize=fuzzer,address -g harness.cc -o fuzz\n```\n\nRun with unlimited RSS:\n\n```bash\n.\u002Ffuzz -rss_limit_mb=0\n```\n\n**Integration tips:**\n- Always combine `-fsanitize=fuzzer` with `-fsanitize=address`\n- Use `-g` for detailed stack traces in crash reports\n- Consider `ASAN_OPTIONS=abort_on_error=1` for better crash handling\n\nSee: [libFuzzer: AddressSanitizer](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffuzzing\u002Fblob\u002Fmaster\u002Fdocs\u002Fgood-fuzz-target.md#memory-error-detection)\n\n### AFL++\n\nUse the `AFL_USE_ASAN` environment variable:\n\n```bash\nAFL_USE_ASAN=1 afl-clang-fast++ -g harness.cc -o fuzz\n```\n\nRun with unlimited memory:\n\n```bash\nafl-fuzz -m none -i input_dir -o output_dir .\u002Ffuzz\n```\n\n**Integration tips:**\n- `AFL_USE_ASAN=1` automatically adds proper compilation flags\n- Use `-m none` to disable AFL++'s memory limit\n- Consider `AFL_MAP_SIZE` for programs with large coverage maps\n\nSee: [AFL++: AddressSanitizer](https:\u002F\u002Fgithub.com\u002FAFLplusplus\u002FAFLplusplus\u002Fblob\u002Fstable\u002Fdocs\u002Ffuzzing_in_depth.md#a-using-sanitizers)\n\n### cargo-fuzz (Rust)\n\nUse the `--sanitizer=address` flag:\n\n```bash\ncargo fuzz run fuzz_target --sanitizer=address\n```\n\nOr configure in `fuzz\u002FCargo.toml`:\n\n```toml\n[profile.release]\nopt-level = 3\ndebug = true\n```\n\n**Integration tips:**\n- ASan is useful for fuzzing unsafe Rust code or FFI boundaries\n- Safe Rust code may not benefit as much (compiler already prevents many errors)\n- Focus on unsafe blocks, raw pointers, and C library bindings\n\nSee: [cargo-fuzz: AddressSanitizer](https:\u002F\u002Frust-fuzz.github.io\u002Fbook\u002Fcargo-fuzz\u002Ftutorial.html#sanitizers)\n\n### honggfuzz\n\nCompile with ASan and link with honggfuzz:\n\n```bash\nhonggfuzz -i input_dir -o output_dir -- .\u002Ffuzz_target_asan\n```\n\nCompile the target:\n\n```bash\nhfuzz-clang -fsanitize=address -g target.c -o fuzz_target_asan\n```\n\n**Integration tips:**\n- honggfuzz works well with ASan out of the box\n- Use feedback-driven mode for better coverage with sanitizers\n- Monitor memory usage, as ASan increases memory footprint\n\n## Troubleshooting\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Fuzzer kills process immediately | Memory limit too low for ASan's 20TB virtual memory | Use `-rss_limit_mb=0` (libFuzzer) or `-m none` (AFL++) |\n| \"ASan runtime not initialized\" | Wrong linking order or missing runtime | Ensure `-fsanitize=address` used in both compile and link |\n| Leak reports clutter output | LeakSanitizer enabled by default | Set `ASAN_OPTIONS=detect_leaks=0` |\n| Poor performance (>4x slowdown) | Debug mode or unoptimized build | Compile with `-O2` or `-O3` alongside `-fsanitize=address` |\n| ASan not detecting obvious bugs | Binary not instrumented | Check with `ASAN_OPTIONS=verbosity=1` that ASan prints startup info |\n| False positives | Interceptor conflicts | Check ASan FAQ for known issues with specific libraries |\n\n## Related Skills\n\n### Tools That Use This Technique\n\n| Skill | How It Applies |\n|-------|----------------|\n| **libfuzzer** | Compile with `-fsanitize=fuzzer,address` for integrated fuzzing with memory error detection |\n| **aflpp** | Use `AFL_USE_ASAN=1` environment variable during compilation |\n| **cargo-fuzz** | Use `--sanitizer=address` flag to enable ASan for Rust fuzz targets |\n| **honggfuzz** | Compile target with `-fsanitize=address` for ASan-instrumented fuzzing |\n\n### Related Techniques\n\n| Skill | Relationship |\n|-------|--------------|\n| **undefined-behavior-sanitizer** | Often used together with ASan for comprehensive bug detection (undefined behavior + memory errors) |\n| **fuzz-harness-writing** | Harnesses must be designed to handle ASan-detected crashes and avoid false positives |\n| **coverage-analysis** | Coverage-guided fuzzing helps trigger code paths where ASan can detect memory errors |\n\n## Resources\n\n### Key External Resources\n\n**[AddressSanitizer on Google Sanitizers Wiki](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fsanitizers\u002Fwiki\u002FAddressSanitizer)**\n\nThe official ASan documentation covers:\n- Algorithm and implementation details\n- Complete list of detected error types\n- Performance characteristics and overhead\n- Platform-specific behavior\n- Known limitations and incompatibilities\n\n**[SanitizerCommonFlags](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fsanitizers\u002Fwiki\u002FSanitizerCommonFlags)**\n\nCommon configuration flags shared across all sanitizers:\n- `verbosity`: Control diagnostic output level\n- `log_path`: Redirect sanitizer output to files\n- `symbolize`: Enable\u002Fdisable symbol resolution in reports\n- `external_symbolizer_path`: Use custom symbolizer\n\n**[AddressSanitizerFlags](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fsanitizers\u002Fwiki\u002FAddressSanizerFlags)**\n\nASan-specific configuration options:\n- `detect_leaks`: Control memory leak detection\n- `abort_on_error`: Call `abort()` vs `_exit()` on error\n- `detect_stack_use_after_return`: Detect stack use-after-return bugs\n- `check_initialization_order`: Find initialization order bugs\n\n**[AddressSanitizer FAQ](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fsanitizers\u002Fwiki\u002FAddressSanitizer#faq)**\n\nCommon pitfalls and solutions:\n- Linking order issues\n- Conflicts with other tools\n- Platform-specific problems\n- Performance tuning tips\n\n**[Clang AddressSanitizer Documentation](https:\u002F\u002Fclang.llvm.org\u002Fdocs\u002FAddressSanitizer.html)**\n\nClang-specific guidance:\n- Compilation flags and options\n- Interaction with other Clang features\n- Supported platforms and architectures\n\n**[GCC Instrumentation Options](https:\u002F\u002Fgcc.gnu.org\u002Fonlinedocs\u002Fgcc\u002FInstrumentation-Options.html#index-fsanitize_003daddress)**\n\nGCC-specific ASan documentation:\n- GCC-specific flags and behavior\n- Differences from Clang implementation\n- Platform support in GCC\n\n**[AddressSanitizer: A Fast Address Sanity Checker (USENIX Paper)](https:\u002F\u002Fwww.usenix.org\u002Fsites\u002Fdefault\u002Ffiles\u002Fconference\u002Fprotected-files\u002Fserebryany_atc12_slides.pdf)**\n\nOriginal research paper with technical details:\n- Shadow memory algorithm\n- Virtual memory requirements (historically 16TB, now ~20TB)\n- Performance benchmarks\n- Design decisions and tradeoffs\n","# AddressSanitizer (ASan)\n\nAddressSanitizer (ASan) is a widely adopted memory error detection tool used extensively during software testing, particularly fuzzing. It helps detect memory corruption bugs that might otherwise go unnoticed, such as buffer overflows, use-after-free errors, and other memory safety violations.\n\n## Overview\n\nASan is a standard practice in fuzzing due to its effectiveness in identifying memory vulnerabilities. It instruments code at compile time to track memory allocations and accesses, detecting illegal operations at runtime.\n\n### Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Instrumentation | ASan adds runtime checks to memory operations during compilation |\n| Shadow Memory | Maps 20TB of virtual memory to track allocation state |\n| Performance Cost | Approximately 2-4x slowdown compared to non-instrumented code |\n| Detection Scope | Finds buffer overflows, use-after-free, double-free, and memory leaks |\n\n## When to Apply\n\n**Apply this technique when:**\n- Fuzzing C\u002FC++ code for memory safety vulnerabilities\n- Testing Rust code with unsafe blocks\n- Debugging crashes related to memory corruption\n- Running unit tests where memory errors are suspected\n\n**Skip this technique when:**\n- Running production code (ASan can reduce security)\n- Platform is Windows or macOS (limited ASan support)\n- Performance overhead is unacceptable for your use case\n- Fuzzing pure safe languages without FFI (e.g., pure Go, pure Java)\n\n## Quick Reference\n\n| Task | Command\u002FPattern |\n|------|-----------------|\n| Enable ASan (Clang\u002FGCC) | `-fsanitize=address` |\n| Enable verbosity | `ASAN_OPTIONS=verbosity=1` |\n| Disable leak detection | `ASAN_OPTIONS=detect_leaks=0` |\n| Force abort on error | `ASAN_OPTIONS=abort_on_error=1` |\n| Multiple options | `ASAN_OPTIONS=verbosity=1:abort_on_error=1` |\n\n## Step-by-Step\n\n### Step 1: Compile with ASan\n\nCompile and link your code with the `-fsanitize=address` flag:\n\n```bash\nclang -fsanitize=address -g -o my_program my_program.c\n```\n\nThe `-g` flag is recommended to get better stack traces when ASan detects errors.\n\n### Step 2: Configure ASan Options\n\nSet the `ASAN_OPTIONS` environment variable to configure ASan behavior:\n\n```bash\nexport ASAN_OPTIONS=verbosity=1:abort_on_error=1:detect_leaks=0\n```\n\n### Step 3: Run Your Program\n\nExecute the ASan-instrumented binary. When memory errors are detected, ASan will print detailed reports:\n\n```bash\n.\u002Fmy_program\n```\n\n### Step 4: Adjust Fuzzer Memory Limits\n\nASan requires approximately 20TB of virtual memory. Disable fuzzer memory restrictions:\n\n- libFuzzer: `-rss_limit_mb=0`\n- AFL++: `-m none`\n\n## Common Patterns\n\n### Pattern: Basic ASan Integration\n\n**Use Case:** Standard fuzzing setup with ASan\n\n**Before:**\n```bash\nclang -o fuzz_target fuzz_target.c\n.\u002Ffuzz_target\n```\n\n**After:**\n```bash\nclang -fsanitize=address -g -o fuzz_target fuzz_target.c\nASAN_OPTIONS=verbosity=1:abort_on_error=1 .\u002Ffuzz_target\n```\n\n### Pattern: ASan with Unit Tests\n\n**Use Case:** Enable ASan for unit test suite\n\n**Before:**\n```bash\ngcc -o test_suite test_suite.c -lcheck\n.\u002Ftest_suite\n```\n\n**After:**\n```bash\ngcc -fsanitize=address -g -o test_suite test_suite.c -lcheck\nASAN_OPTIONS=detect_leaks=1 .\u002Ftest_suite\n```\n\n## Advanced Usage\n\n### Tips and Tricks\n\n| Tip | Why It Helps |\n|-----|--------------|\n| Use `-g` flag | Provides detailed stack traces for debugging |\n| Set `verbosity=1` | Confirms ASan is enabled before program starts |\n| Disable leaks during fuzzing | Leak detection doesn't cause immediate crashes, clutters output |\n| Enable `abort_on_error=1` | Some fuzzers require `abort()` instead of `_exit()` |\n\n### Understanding ASan Reports\n\nWhen ASan detects a memory error, it prints a detailed report including:\n\n- **Error type**: Buffer overflow, use-after-free, etc.\n- **Stack trace**: Where the error occurred\n- **Allocation\u002Fdeallocation traces**: Where memory was allocated\u002Ffreed\n- **Memory map**: Shadow memory state around the error\n\nExample ASan report:\n```\n==12345==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300000eff4 at pc 0x00000048e6a3\nREAD of size 4 at 0x60300000eff4 thread T0\n    #0 0x48e6a2 in main \u002Fpath\u002Fto\u002Ffile.c:42\n```\n\n### Combining Sanitizers\n\nASan can be combined with other sanitizers for comprehensive detection:\n\n```bash\nclang -fsanitize=address,undefined -g -o fuzz_target fuzz_target.c\n```\n\n### Platform-Specific Considerations\n\n**Linux**: Full ASan support with best performance\n**macOS**: Limited support, some features may not work\n**Windows**: Experimental support, not recommended for production fuzzing\n\n## Anti-Patterns\n\n| Anti-Pattern | Problem | Correct Approach |\n|--------------|---------|------------------|\n| Using ASan in production | Can make applications less secure | Use ASan only for testing |\n| Not disabling memory limits | Fuzzer may kill process due to 20TB virtual memory | Set `-rss_limit_mb=0` or `-m none` |\n| Ignoring leak reports | Memory leaks indicate resource management issues | Review leak reports at end of fuzzing campaign |\n\n## Tool-Specific Guidance\n\n### libFuzzer\n\nCompile with both fuzzer and address sanitizer:\n\n```bash\nclang++ -fsanitize=fuzzer,address -g harness.cc -o fuzz\n```\n\nRun with unlimited RSS:\n\n```bash\n.\u002Ffuzz -rss_limit_mb=0\n```\n\n**Integration tips:**\n- Always combine `-fsanitize=fuzzer` with `-fsanitize=address`\n- Use `-g` for detailed stack traces in crash reports\n- Consider `ASAN_OPTIONS=abort_on_error=1` for better crash handling\n\nSee: [libFuzzer: AddressSanitizer](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Ffuzzing\u002Fblob\u002Fmaster\u002Fdocs\u002Fgood-fuzz-target.md#memory-error-detection)\n\n### AFL++\n\nUse the `AFL_USE_ASAN` environment variable:\n\n```bash\nAFL_USE_ASAN=1 afl-clang-fast++ -g harness.cc -o fuzz\n```\n\nRun with unlimited memory:\n\n```bash\nafl-fuzz -m none -i input_dir -o output_dir .\u002Ffuzz\n```\n\n**Integration tips:**\n- `AFL_USE_ASAN=1` automatically adds proper compilation flags\n- Use `-m none` to disable AFL++'s memory limit\n- Consider `AFL_MAP_SIZE` for programs with large coverage maps\n\nSee: [AFL++: AddressSanitizer](https:\u002F\u002Fgithub.com\u002FAFLplusplus\u002FAFLplusplus\u002Fblob\u002Fstable\u002Fdocs\u002Ffuzzing_in_depth.md#a-using-sanitizers)\n\n### cargo-fuzz (Rust)\n\nUse the `--sanitizer=address` flag:\n\n```bash\ncargo fuzz run fuzz_target --sanitizer=address\n```\n\nOr configure in `fuzz\u002FCargo.toml`:\n\n```toml\n[profile.release]\nopt-level = 3\ndebug = true\n```\n\n**Integration tips:**\n- ASan is useful for fuzzing unsafe Rust code or FFI boundaries\n- Safe Rust code may not benefit as much (compiler already prevents many errors)\n- Focus on unsafe blocks, raw pointers, and C library bindings\n\nSee: [cargo-fuzz: AddressSanitizer](https:\u002F\u002Frust-fuzz.github.io\u002Fbook\u002Fcargo-fuzz\u002Ftutorial.html#sanitizers)\n\n### honggfuzz\n\nCompile with ASan and link with honggfuzz:\n\n```bash\nhonggfuzz -i input_dir -o output_dir -- .\u002Ffuzz_target_asan\n```\n\nCompile the target:\n\n```bash\nhfuzz-clang -fsanitize=address -g target.c -o fuzz_target_asan\n```\n\n**Integration tips:**\n- honggfuzz works well with ASan out of the box\n- Use feedback-driven mode for better coverage with sanitizers\n- Monitor memory usage, as ASan increases memory footprint\n\n## Troubleshooting\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Fuzzer kills process immediately | Memory limit too low for ASan's 20TB virtual memory | Use `-rss_limit_mb=0` (libFuzzer) or `-m none` (AFL++) |\n| \"ASan runtime not initialized\" | Wrong linking order or missing runtime | Ensure `-fsanitize=address` used in both compile and link |\n| Leak reports clutter output | LeakSanitizer enabled by default | Set `ASAN_OPTIONS=detect_leaks=0` |\n| Poor performance (>4x slowdown) | Debug mode or unoptimized build | Compile with `-O2` or `-O3` alongside `-fsanitize=address` |\n| ASan not detecting obvious bugs | Binary not instrumented | Check with `ASAN_OPTIONS=verbosity=1` that ASan prints startup info |\n| False positives | Interceptor conflicts | Check ASan FAQ for known issues with specific libraries |\n\n## Related Skills\n\n### Tools That Use This Technique\n\n| Skill | How It Applies |\n|-------|----------------|\n| **libfuzzer** | Compile with `-fsanitize=fuzzer,address` for integrated fuzzing with memory error detection |\n| **aflpp** | Use `AFL_USE_ASAN=1` environment variable during compilation |\n| **cargo-fuzz** | Use `--sanitizer=address` flag to enable ASan for Rust fuzz targets |\n| **honggfuzz** | Compile target with `-fsanitize=address` for ASan-instrumented fuzzing |\n\n### Related Techniques\n\n| Skill | Relationship |\n|-------|--------------|\n| **undefined-behavior-sanitizer** | Often used together with ASan for comprehensive bug detection (undefined behavior + memory errors) |\n| **fuzz-harness-writing** | Harnesses must be designed to handle ASan-detected crashes and avoid false positives |\n| **coverage-analysis** | Coverage-guided fuzzing helps trigger code paths where ASan can detect memory errors |\n\n## Resources\n\n### Key External Resources\n\n**[AddressSanitizer on Google Sanitizers Wiki](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fsanitizers\u002Fwiki\u002FAddressSanitizer)**\n\nThe official ASan documentation covers:\n- Algorithm and implementation details\n- Complete list of detected error types\n- Performance characteristics and overhead\n- Platform-specific behavior\n- Known limitations and incompatibilities\n\n**[SanitizerCommonFlags](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fsanitizers\u002Fwiki\u002FSanitizerCommonFlags)**\n\nCommon configuration flags shared across all sanitizers:\n- `verbosity`: Control diagnostic output level\n- `log_path`: Redirect sanitizer output to files\n- `symbolize`: Enable\u002Fdisable symbol resolution in reports\n- `external_symbolizer_path`: Use custom symbolizer\n\n**[AddressSanitizerFlags](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fsanitizers\u002Fwiki\u002FAddressSanizerFlags)**\n\nASan-specific configuration options:\n- `detect_leaks`: Control memory leak detection\n- `abort_on_error`: Call `abort()` vs `_exit()` on error\n- `detect_stack_use_after_return`: Detect stack use-after-return bugs\n- `check_initialization_order`: Find initialization order bugs\n\n**[AddressSanitizer FAQ](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fsanitizers\u002Fwiki\u002FAddressSanitizer#faq)**\n\nCommon pitfalls and solutions:\n- Linking order issues\n- Conflicts with other tools\n- Platform-specific problems\n- Performance tuning tips\n\n**[Clang AddressSanitizer Documentation](https:\u002F\u002Fclang.llvm.org\u002Fdocs\u002FAddressSanitizer.html)**\n\nClang-specific guidance:\n- Compilation flags and options\n- Interaction with other Clang features\n- Supported platforms and architectures\n\n**[GCC Instrumentation Options](https:\u002F\u002Fgcc.gnu.org\u002Fonlinedocs\u002Fgcc\u002FInstrumentation-Options.html#index-fsanitize_003daddress)**\n\nGCC-specific ASan documentation:\n- GCC-specific flags and behavior\n- Differences from Clang implementation\n- Platform support in GCC\n\n**[AddressSanitizer: A Fast Address Sanity Checker (USENIX Paper)](https:\u002F\u002Fwww.usenix.org\u002Fsites\u002Fdefault\u002Ffiles\u002Fconference\u002Fprotected-files\u002Fserebryany_atc12_slides.pdf)**\n\nOriginal research paper with technical details:\n- Shadow memory algorithm\n- Virtual memory requirements (historically 16TB, now ~20TB)\n- Performance benchmarks\n- Design decisions and tradeoffs\n",{"name":5,"type":23,"description":7},"technique","main","f37de8f681f0c0ca0e0ebab6e5fddf764ca7553d","skills\u002Faddress-sanitizer",1,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one","https:\u002F\u002Fagisota.github.io\u002Fold-one\u002F","https:\u002F\u002Fgithub.com\u002Fagisota","pzd.world","2026-07-04 22:32:06",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add agisota\u002Fold-one --skill address-sanitizer",{"tool":39,"command":40},"bunx","bunx skills add agisota\u002Fold-one --skill address-sanitizer",{"tool":42,"command":43},"pnpm","pnpm dlx skills add agisota\u002Fold-one --skill address-sanitizer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Faddress-sanitizer\u002FSKILL.md",true,[],[48,55,62,71,78,85],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":18},"01M75KRGZWQWE9JDBS6RX42NWV","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M75KRCZHKE0ZYAQFFYHS0YNP","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":66,"licenseFileUrl":67,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M75KR94KYQ30DTE1P9WNDAE0","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M75KR3H13YJ9QHMD49818FA1","yara-rule-authoring","Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyara-rule-authoring\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M75KQMPY8A4Y8XTDD2DT0M9T","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M75KQHNZ0ANZNJGZY6M8MDAK","x-api","X\u002FTwitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-api\u002FSKILL.md",[],[]]