Two Rust Borrow Checker Bugs Allow Unsafe Code to Compile
Two long-standing bugs in Rust's borrow checker, dating to 2013 and 2014, can allow code violating aliasing rules to compile. One bug involves raw pointers derived from mutable references, where the checker loses track of the original borrow. The other bug occurs in closure capture analysis, failing to detect conflicts between captured mutable and shared references. These gaps can let undefined behavior slip into production code without explicit unsafe blocks. The issues stem from limitations in the compiler's intermediate representation analysis.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in