Browse by type
BorrowSanitizer is a work-in-progress LLVM instrumentation pass for detecting aliasing violations in multi-language Rust applications. Our project is still in early development, but may help you find cross-language bugs otherwise undetectable by Miri. Our goal is to support detecting the following types of errors:
Check out our website for more information.
The easiest way to try BorrowSanitizer is inside a Docker container. Our image supports the following platforms:
| Platform | Target | Description |
|---|---|---|
linux/amd64 |
aarch64-unknown-linux-gnu |
ARM64 Linux |
linux/arm64 |
x86_64-unknown-linux-gnu |
X86 Linux |
First, pull our latest image from GitHub's container registry.
docker pull ghcr.io/borrowsanitizer/bsan:latest
Then, launch a container and attach a shell.
docker run -it bsan:latest
Once inside the container, you can use our Cargo plugin to build and test crates using BorrowSanitizer.
cargo bsan test
Our plugin supports most of the same subcommands as Miri. When it's used for the first time, it will perform a one-time setup step of building an instrumented sysroot. You can trigger this step manually using the setup subcommand.
We follow the LLVM Project's AI Tool Use Policy. All AI-generated content must be disclosed. There must always be a human in the loop.
We welcome contributions! Please consult our contribution guide and join our Zulip if you have questions.
BorrowSanitizer has been used to find a variety of new cross-language aliasing bugs in open source projects.
* Overlapping references in aws-lc-rs
* Writing through an immutable reference in CXX
BorrowSanitizer is dual-licensed under Apache and MIT, following the Rust project.
Zulip sponsors free hosting for BorrowSanitizer. Zulip is an organized team chat app designed for efficient communication.
browse all types & interfaces →