Towards verifying unsafe Rust programs against Rust's pointer-aliasing restrictions
This work addresses the challenge posed by unsafe code in Rust, which bypasses the type system and may violate pointer aliasing rules, thereby compromising memory safety and the correctness of compiler optimizations. The paper presents the first modular program logic for unsafe Rust, formally capturing ownership and borrowing semantics to enable static, compositional verification of pointer aliasing constraints. By doing so, it bridges the verification gap left by Rust’s type system within unsafe regions, supporting modular reasoning while ensuring that programs containing unsafe code still adhere to Rust’s memory safety guarantees.