Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

Disable single-pass regalloc in fuzzing and add docs (#11864)

Alex Crichton152ee38751b7
diff --git a/crates/fuzzing/src/generators/config.rs b/crates/fuzzing/src/generators/config.rs
index a72a68cc45..6f70915721 100644
--- a/crates/fuzzing/src/generators/config.rs
+++ b/crates/fuzzing/src/generators/config.rs
@@ -845,7 +845,15 @@ impl RegallocAlgorithm {
fn to_wasmtime(&self) -> wasmtime::RegallocAlgorithm {
match self {
RegallocAlgorithm::Backtracking => wasmtime::RegallocAlgorithm::Backtracking,
- RegallocAlgorithm::SinglePass => wasmtime::RegallocAlgorithm::SinglePass,
+ RegallocAlgorithm::SinglePass => {
+ // FIXME(#11850)
+ const SINGLE_PASS_KNOWN_BUGGY_AT_THIS_TIME: bool = true;
+ if SINGLE_PASS_KNOWN_BUGGY_AT_THIS_TIME {
+ wasmtime::RegallocAlgorithm::Backtracking
+ } else {
+ wasmtime::RegallocAlgorithm::SinglePass
+ }
+ }
}
}
}
diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs
index 01d90b34af..9890feb8b8 100644
--- a/crates/wasmtime/src/config.rs
+++ b/crates/wasmtime/src/config.rs
@@ -3100,6 +3100,12 @@ pub enum RegallocAlgorithm {
/// cannot foresee constraints or issues that may occur further
/// ahead in the code, so the code may have more spills and moves as
/// a result.
+ ///
+ /// > **Note**: This algorithm is not yet production-ready and has
+ /// > historically had known problems. It is not recommended to enable this
+ /// > algorithm for security-sensitive applications and the Wasmtime project
+ /// > does not consider this configuration option for issuing security
+ /// > advisories at this time.
SinglePass,
}