A Rust Mid-level Intermediate Representation fuzzer
It can generate custom MIR programs containing:
bool, char, arrays,
tuples, references, raw pointers, structs, and enums.Goto, Return, SwitchInt (match), Call.arith_offset (for pointer arithmetics), transmute,
bswap, fmaf64.char, and boolGenerated programs are terminating, UB-free, and deterministic. A discrepancy between testing backends always indicate a bug in them (or a bug in Rustlantis).
Install Miri and Cranelift with Rustup rustup component add miri rustc-codegen-cranelift-preview, then copy config.toml.example to config.toml
To generate and difftest one seed, run
./fuzz-one.sh <seed>
A program will be generated to $TMPDIR and tested. If difftest passes (no bug), it will exit with 0. If difftest spots a difference between testing backends, it will exit with 1 and save the reproduction file to ./repros/.
To generate a program only, run generate
Usage: generate [OPTIONS] <seed>
Arguments:
<seed> generation seed
Options:
-d, --debug generate a program where values are printed instead of hashed (slow)
--call-syntax <call-syntax> switch between different versions of Call syntaxes [default: v4] [possible values: v1, v2, v3, v4]
-h, --help Print help
-V, --version Print version
To difftest an existing program, run difftest
Usage: difftest <file>
Arguments:
<file>
Options:
-h, --help Print help
rustc_codegen_gcc can be used as a backend, but it doesn't support enough language features yet to be usableThe Space Shuttle Atlantis docked with Mir space station seven times: https://en.wikipedia.org/wiki/Shuttle%E2%80%93Mir_program
π¦: Root cause in Rust π: Root cause in LLVM ποΈ: Root cause in Cranelift
RenameReturnPlace is broken: https://github.com/rust-lang/rust/issues/110902ReferencePropagation prevents partial initialisation: https://github.com/rust-lang/rust/issues/111426RegisterCoalescer: https://github.com/llvm/llvm-project/issues/63033ConstProp propagates over mutating borrows: https://github.com/rust-lang/rust/issues/110947*const T in function parameters annotated with readonly: https://github.com/rust-lang/rust/issues/111502ConstProp propagates over assignment of unknown values: https://github.com/rust-lang/rust/issues/118328undef/poison handling in InstCombine: https://github.com/llvm/llvm-project/issues/74890GVN merges moved function arguments: https://github.com/rust-lang/rust/issues/120613GVNPass forgets to remove poison generating flags: https://github.com/llvm/llvm-project/issues/82884InstCombine calculates wrong insertelement instructions: https://github.com/rust-lang/rust/issues/121996 & https://github.com/llvm/llvm-project/issues/84025GVN misunderstands aliasing, can create overlapping assignments: https://github.com/rust-lang/rust/issues/141038ReferencePropagation misunderstands aliasing, can add reads of uninitialized memory: https://github.com/rust-lang/rust/issues/141101CopyProp doesn't always respect Tree Borrows aliasing: https://github.com/rust-lang/rust/issues/141122EarlyOtherwiseBranch can insert storage markers incorrectly, creating use of a dead local https://github.com/rust-lang/rust/issues/141212GVN makes an incorrect index access: https://github.com/rust-lang/rust/issues/141251CorrelatedValuePropagation miscompilation: https://github.com/llvm/llvm-project/issues/142286InstCombine miscompilation: https://github.com/llvm/llvm-project/issues/142518x % x wrong sign when x is a negative float: https://github.com/rust-lang/rust/issues/109567 (first reported https://github.com/rust-lang/rust/issues/102403)Rustlantis is distributed under the terms of both the MIT License and the Apache License (Version 2.0), at your choice.
Β© ETH Zurich and contributors
Rust
99.1%
A Rust Mid-level Intermediate Representation fuzzer
It can generate custom MIR programs containing:
bool, char, arrays,
tuples, references, raw pointers, structs, and enums.Goto, Return, SwitchInt (match), Call.arith_offset (for pointer arithmetics), transmute,
bswap, fmaf64.char, and boolGenerated programs are terminating, UB-free, and deterministic. A discrepancy between testing backends always indicate a bug in them (or a bug in Rustlantis).
Install Miri and Cranelift with Rustup rustup component add miri rustc-codegen-cranelift-preview, then copy config.toml.example to config.toml
To generate and difftest one seed, run
./fuzz-one.sh <seed>
A program will be generated to $TMPDIR and tested. If difftest passes (no bug), it will exit with 0. If difftest spots a difference between testing backends, it will exit with 1 and save the reproduction file to ./repros/.
To generate a program only, run generate
Usage: generate [OPTIONS] <seed>
Arguments:
<seed> generation seed
Options:
-d, --debug generate a program where values are printed instead of hashed (slow)
--call-syntax <call-syntax> switch between different versions of Call syntaxes [default: v4] [possible values: v1, v2, v3, v4]
-h, --help Print help
-V, --version Print version
To difftest an existing program, run difftest
Usage: difftest <file>
Arguments:
<file>
Options:
-h, --help Print help
rustc_codegen_gcc can be used as a backend, but it doesn't support enough language features yet to be usableThe Space Shuttle Atlantis docked with Mir space station seven times: https://en.wikipedia.org/wiki/Shuttle%E2%80%93Mir_program
π¦: Root cause in Rust π: Root cause in LLVM ποΈ: Root cause in Cranelift
RenameReturnPlace is broken: https://github.com/rust-lang/rust/issues/110902ReferencePropagation prevents partial initialisation: https://github.com/rust-lang/rust/issues/111426RegisterCoalescer: https://github.com/llvm/llvm-project/issues/63033ConstProp propagates over mutating borrows: https://github.com/rust-lang/rust/issues/110947*const T in function parameters annotated with readonly: https://github.com/rust-lang/rust/issues/111502ConstProp propagates over assignment of unknown values: https://github.com/rust-lang/rust/issues/118328undef/poison handling in InstCombine: https://github.com/llvm/llvm-project/issues/74890GVN merges moved function arguments: https://github.com/rust-lang/rust/issues/120613GVNPass forgets to remove poison generating flags: https://github.com/llvm/llvm-project/issues/82884InstCombine calculates wrong insertelement instructions: https://github.com/rust-lang/rust/issues/121996 & https://github.com/llvm/llvm-project/issues/84025GVN misunderstands aliasing, can create overlapping assignments: https://github.com/rust-lang/rust/issues/141038ReferencePropagation misunderstands aliasing, can add reads of uninitialized memory: https://github.com/rust-lang/rust/issues/141101CopyProp doesn't always respect Tree Borrows aliasing: https://github.com/rust-lang/rust/issues/141122EarlyOtherwiseBranch can insert storage markers incorrectly, creating use of a dead local https://github.com/rust-lang/rust/issues/141212GVN makes an incorrect index access: https://github.com/rust-lang/rust/issues/141251CorrelatedValuePropagation miscompilation: https://github.com/llvm/llvm-project/issues/142286InstCombine miscompilation: https://github.com/llvm/llvm-project/issues/142518x % x wrong sign when x is a negative float: https://github.com/rust-lang/rust/issues/109567 (first reported https://github.com/rust-lang/rust/issues/102403)Rustlantis is distributed under the terms of both the MIT License and the Apache License (Version 2.0), at your choice.
Β© ETH Zurich and contributors
Rust
99.1%