Symbolic execution engine for LLVM IR, written in Rust
Top 58.3% on sourcepulse
haybale is a symbolic execution engine for LLVM Intermediate Representation (IR), written in Rust. It allows for rigorous, mathematical analysis of program behavior, enabling users to determine all possible inputs that lead to specific outcomes or to answer complex questions about program logic without brute-force testing. This makes it valuable for security researchers, software testers, and developers seeking to verify program correctness and identify potential vulnerabilities.
How It Works
haybale operates by converting program variables into mathematical expressions dependent on program inputs. It then leverages an SMT solver (Boolector) to analyze these expressions and answer queries about program behavior. The engine processes LLVM bitcode, allowing analysis of programs written in languages that compile to LLVM IR, such as C, C++, and Rust. Its design in Rust aims for performance and memory safety, with a modular architecture that allows for custom analysis development.
Quick Start & Requirements
cargo add haybale --features "llvm-14"
(replace llvm-14
with your LLVM version, e.g., llvm-9
to llvm-14
).vendor-boolector
feature)..bc
files) using clang
or rustc
with -emit-llvm
and -g
for debug info.Highlighted Details
find_zero_of_func
and get_possible_return_values_of_func
.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
1 year ago
1 week