What problem does it solve?
This Skill helps engineers find, reproduce, and interpret memory-safety and undefined-behavior problems in Rust code by guiding the use of sanitizers (ASan/TSan/MSan/UBSan) and the Miri interpreter to detect and explain root causes in unsafe or low-level code.
Core Features & Use Cases
- Sanitizer guidance: How to enable and run AddressSanitizer, ThreadSanitizer, MemorySanitizer, and UndefinedBehaviorSanitizer for Rust builds (nightly and CI considerations).
- Miri diagnostics: Steps to run tests and binaries under Miri, configure MIRIFLAGS, and interpret common UB patterns such as dangling pointers, invalid transmute, uninitialized reads, and stacked-borrows violations.
- Report interpretation & CI: Translate sanitizer and Miri outputs into actionable fixes and integrate checks into CI workflows; includes stable-workarounds using containers and cross for environments without nightly.
- Use case: Investigate a failing test that shows an ASan heap-buffer-overflow and determine whether it stems from unsafe pointer arithmetic, Vec reallocation, or a lifetime violation found by Miri.
Quick Start
Run Miri or the appropriate sanitizer on the repository tests and summarize any detected undefined behavior or memory errors with suggested fixes.