Sha256: 4da5d01c3d43954437288a96f8842f11f01431d99fbf4a7210e9bb71b56393dc

Contents?: true

Size: 1.64 KB

Versions: 21

Compression:

Stored size: 1.64 KB

Contents

//! # Cranelift Control
//!
//! This is the home of the control plane of chaos mode, a compilation feature
//! intended to be turned on for certain fuzz targets. When the feature is
//! turned off, as is normally the case, [ControlPlane] will be a zero-sized
//! type and optimized away.
//!
//! While the feature is turned on, the struct [ControlPlane]
//! provides functionality to tap into pseudo-randomness at specific locations
//! in the code. It may be used for targeted fuzzing of compiler internals,
//! e.g. manipulate heuristic optimizations, clobber undefined register bits
//! etc.
//!
//! There are two ways to acquire a [ControlPlane]:
//! - [arbitrary] for the real deal
//! - [default] for an "empty" control plane which always returns default
//!   values
//!
//! ## Fuel Limit
//!
//! Controls the number of mutations or optimizations that the compiler will
//! perform before stopping.
//!
//! When a perturbation introduced by chaos mode triggers a bug, it may not be
//! immediately clear which of the introduced perturbations was the trigger. The
//! fuel limit can then be used to binary-search for the trigger. It limits the
//! number of perturbations introduced by the control plane. The fuel limit will
//! typically be set with a command line argument passed to a fuzz target. For
//! example:
//! ```sh
//! cargo fuzz run --features chaos $TARGET -- --fuel=16
//! ```
//!
//! [arbitrary]: ControlPlane#method.arbitrary
//! [default]: ControlPlane#method.default

#[cfg(not(feature = "chaos"))]
mod zero_sized;
#[cfg(not(feature = "chaos"))]
pub use zero_sized::*;

#[cfg(feature = "chaos")]
mod chaos;
#[cfg(feature = "chaos")]
pub use chaos::*;

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
wasmtime-23.0.2 ./ext/cargo-vendor/cranelift-control-0.110.2/src/lib.rs
wasmtime-22.0.0 ./ext/cargo-vendor/cranelift-control-0.109.0/src/lib.rs
wasmtime-21.0.1 ./ext/cargo-vendor/cranelift-control-0.108.1/src/lib.rs
wasmtime-20.0.2 ./ext/cargo-vendor/cranelift-control-0.107.2/src/lib.rs
wasmtime-20.0.0 ./ext/cargo-vendor/cranelift-control-0.107.2/src/lib.rs
wasmtime-18.0.3 ./ext/cargo-vendor/cranelift-control-0.105.3/src/lib.rs
wasmtime-17.0.1 ./ext/cargo-vendor/cranelift-control-0.104.1/src/lib.rs
wasmtime-17.0.0 ./ext/cargo-vendor/cranelift-control-0.104.0/src/lib.rs
wasmtime-16.0.0 ./ext/cargo-vendor/cranelift-control-0.103.0/src/lib.rs
wasmtime-15.0.1 ./ext/cargo-vendor/cranelift-control-0.102.1/src/lib.rs
wasmtime-15.0.0 ./ext/cargo-vendor/cranelift-control-0.102.1/src/lib.rs
wasmtime-14.0.4 ./ext/cargo-vendor/cranelift-control-0.101.4/src/lib.rs
wasmtime-14.0.3 ./ext/cargo-vendor/cranelift-control-0.101.4/src/lib.rs
wasmtime-14.0.1 ./ext/cargo-vendor/cranelift-control-0.101.1/src/lib.rs
wasmtime-14.0.0 ./ext/cargo-vendor/cranelift-control-0.101.1/src/lib.rs
wasmtime-13.0.0 ./ext/cargo-vendor/cranelift-control-0.100.0/src/lib.rs
wasmtime-12.0.1 ./ext/cargo-vendor/cranelift-control-0.99.1/src/lib.rs
wasmtime-12.0.0 ./ext/cargo-vendor/cranelift-control-0.99.1/src/lib.rs
wasmtime-11.0.0 ./ext/cargo-vendor/cranelift-control-0.98.1/src/lib.rs
wasmtime-10.0.1 ./ext/cargo-vendor/cranelift-control-0.97.1/src/lib.rs