Miri: Practical Undefined Behavior Detection for Rust (Keynote)

Rust is most well-known for it strong type system, guaranteeing memory safety and thread safety despite a low-level programming paradigm that does not require a garbage collector. However, not all code can be written in the confines of a safe type system: sometimes, the programmer has to be more clever than the compiler permits. This is where unsafe Rust comes in, a set of additional operations that come with great power and great responsibility. They give programmers the power to program directly against the underlying machine model, side-stepping all the limitations of the type system. However, it is the programmer’s responsibility to ensure that the preconditions of these unsafe operations are maintained, or else runtime behavior is entirely unconstrained – the infamous Undefined Behavior. Miri is a tool that helps programmers deal with this responsibility. Specifically, Miri can execute Rust code in a way that detects (almost) all Undefined Behavior. It is trivial to deploy, requiring no annotations and being distributed with the Rust nightly toolchain. Miri has found numerous bugs in real-world code and has become a standard tool for unsafe Rust programmers. That makes it the first practical tool for reliably detecting Undefined Behavior – in any language. In this talk, I will give an overview of what kinds of bugs Miri is able to find, how Miri works, and how it helps in the ongoing effort of formally specifying the Rust language.

Authors

Institutions

Publication Details

Published
2024-09-13
DOI
https://doi.org/10.1145/3679005.3695733
Primary Topic
Smart Agriculture and AI
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Miri: Practical Undefined Behavior Detection for Rust (Keynote)

Ralf Jung
Smart Agriculture and AI
article

Miri: Practical Undefined Behavior Detection for Rust (Keynote)

Ralf Jung
article en

Abstract

Rust is most well-known for it strong type system, guaranteeing memory safety and thread safety despite a low-level programming paradigm that does not require a garbage collector. However, not all code can be written in the confines of a safe type system: sometimes, the programmer has to be more clever than the compiler permits. This is where unsafe Rust comes in, a set of additional operations that come with great power and great responsibility. They give programmers the power to program directly against the underlying machine model, side-stepping all the limitations of the type system. However, it is the programmer’s responsibility to ensure that the preconditions of these unsafe operations are maintained, or else runtime behavior is entirely unconstrained – the infamous Undefined Behavior. Miri is a tool that helps programmers deal with this responsibility. Specifically, Miri can execute Rust code in a way that detects (almost) all Undefined Behavior. It is trivial to deploy, requiring no annotations and being distributed with the Rust nightly toolchain. Miri has found numerous bugs in real-world code and has become a standard tool for unsafe Rust programmers. That makes it the first practical tool for reliably detecting Undefined Behavior – in any language. In this talk, I will give an overview of what kinds of bugs Miri is able to find, how Miri works, and how it helps in the ongoing effort of formally specifying the Rust language.

ETH Zurich (CH)
Zero hunger
Openalex Percentile: Top 91%
Smart Agriculture and AI
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.