Miri, Undefined Behavior and Foreign Functions
summary
Claim: Miri finds concrete undefined behavior by interpreting MIR and reporting the exact offending memory ops. Toolchain specifics: install nightly, add the miri component, run cargo miri on tests or binaries. Built thing and limits: a MIR interpreter with shims emulate foreign functions across platforms that works but is slow and only catches UB that actually executes and cannot yet detect data races. Contribution hook: write shims for missing FFI/platform calls.
AI-written summary · about
chapters (21)
- 0:00Intro
- 0:31Who am I
- 0:51Overview
- 2:34Why use unsafe Rust
- 4:06What can unsafe Rust do
- 5:51What are raw pointers
- 8:12The byte array
- 10:59Undefined behavior
- 13:50Broken rules
- 14:48Good news
- 15:22Bad news
- 17:03What is Miri
- 18:22How to use Miri
- 21:21How Miri works
- 24:27Miri limitations
- 25:38Why does this matter
- 26:09Foreign functions
- 27:37Miri and undefined behavior
- 30:54Miri and foreign functions
- 33:35Miri contributions
- 37:22Questions
related talks
25mMiri: Practical Undefined Behavior Detection for Rust
21mMind the Boundary: Detecting Undefined Behavior Across Rust’s FFI
59mWhat's the deal with unsafe Rust?
40mBorrowSanitizer: Securing Rust Across Foreign Function Boundaries
15mHow Do Programmers Use Unsafe Rust?
38mCorrosive C - Compiling Rust to C to target new platforms
42mWhat If We Pretended Unsafe Code Was Nice, And Then It Was?
58mRust for The Curious C++ Developers
