

BorrowSanitizer: Finding Rust Aliasing Bugs Across Languages
Join us for a talk by Molly MacLaren, a computer researcher at CMU.
BorrowSanitizer: borrowSanitizer/bsan
We live in the era of the Rust rewrite, but what happens when this Rust code needs to interop with legacy code? The Rust compiler can't guarantee memory safety at the foreign function boundary. Existing tools are no help either: Miri, Rust’s undefined behavior detector, can only analyze Rust code and runs orders of magnitude slower than native execution.
In this talk, I’ll introduce BorrowSanitizer, a dynamic analysis tool that detects memory bugs across multi-language programs. BorrowSanitizer instruments code at the LLVM level, so it analyzes Rust and C/C++ alike, several times faster than Miri. It checks every memory access against Tree Borrows, a model of Rust’s aliasing rules. As part of our evaluation, we’ve run BorrowSanitizer on thousands of open-source libraries and discovered hundreds of previously unknown aliasing violations.
*Food (Salvatore’s Tomato Pies) & drinks will be provided. Bring friends!