~/talk

What's the deal with unsafe Rust?

Talkat Scala Days 2025 · 2025-08-19..08-21· [rust, security]
slides:none on file

Explains why unsafe Rust exists, shows Mini Rust spec as an executable operational semantics and the MIRI interpreter as a tester, and demonstrates a real UB: reading an uninitialized i8 leads optimizations to break an assertion (Heisenbug). Gives the concrete pattern used (mutex implemented with unsafe plus a safe API), reports MIRI ran on 30,000 crates with ~70% passing, ~3% exhibiting UB and ~20% hitting unsupported FFI operations.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05Rust’s inspiration
  3. 2:08Ownership and borrowing
  4. 4:37Safe versus unsafe Rust
  5. 7:45Mutexes require unsafe
  6. 13:44Unsafe in Rust’s ecosystem
  7. 14:49Dangers of unsafe Rust
  8. 17:16Heisenbugs in unsafe
  9. 18:39Undefined behavior
  10. 21:53Uninitialized memory
  11. 24:48Formalizing unsafe Rust
  12. 27:16Mini Rust semantics
  13. 30:45Mini Rust syntax
  14. 34:16Mini Rust interpreter
  15. 36:25Memory model in Mini Rust
  16. 38:55Encoding values in Mini Rust
  17. 41:03MIRI detects UB
  18. 44:36MIRI limitations
  19. 46:43MIRI team contributions
  20. 48:07Balancing safety and control
  21. 51:36Formal semantics tools
  22. 53:00Translating Rust to Mini Rust
  23. 55:06MIRI guardrails
  24. 57:11Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.