Mind the Boundary: Detecting Undefined Behavior Across Rust’s FFI
summary
Claims that Rust type assumptions are turned into dynamic checks from Rust types that run at FFI boundaries, a harness that uses MIRI-guided PBT to drive execution to C calls, and an LLVM interpreter to validate each step inside the foreign code. Built a prototype that generates property based tests from Rust types and checks behavior inside the FFI. Early experiments inject random operations and find almost all introduced UB while vanilla MIRI/LLVM runs miss those cases, showing promising efficiency and effectiveness.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:07Rust and C interoperability
- 3:44Memory safety challenges in Rust FFI
- 6:15Tool support for Rust FFI safety
- 7:22Tools for undefined behavior in Rust
- 9:28Rust's memory safety pillars
- 12:16Undefined behavior in Rust FFI demo
- 13:43Memory ownership problems in FFI
- 15:10Solution using type information
- 16:12MIR-PBT for FFI testing
- 17:59Future plans and goals
- 18:19Conclusion and Q&A
related talks
25mMiri: Practical Undefined Behavior Detection for Rust
59mWhat's the deal with unsafe Rust?
44mMiri, Undefined Behavior and Foreign Functions
28m"Rust Interop: Memory Safety Across Foreign Function Boundaries"
28mDetecting Borrow and Provenance Bugs Across Unsafe Rust [...]
35m"Memory Safety is Merely Table Stakes [...]"
40mBorrowSanitizer: Securing Rust Across Foreign Function Boundaries
36mThe Rust Borrow Checker: A Deep Dive
