Update memfd support with a runtime toggle (#3778)
This commit updates the `memfd` support in Wasmtime to have a runtime toggle as to whether it's used or not. The compile-time feature gating `memfd` support is now also re-enabled by default, but the new runtime switch is still disabled-by-default. Additionally this commit updates our fuzz oracle to turn on/off the memfd flag to re-enable fuzzing with memfd on oss-fuzz.
This commit is contained in:
@@ -61,6 +61,7 @@ pub struct WasmtimeConfig {
|
||||
pub(crate) consume_fuel: bool,
|
||||
memory_config: MemoryConfig,
|
||||
force_jump_veneers: bool,
|
||||
memfd: bool,
|
||||
}
|
||||
|
||||
#[derive(Arbitrary, Clone, Debug, Eq, Hash, PartialEq)]
|
||||
@@ -99,7 +100,8 @@ impl Config {
|
||||
.cranelift_nan_canonicalization(self.wasmtime.canonicalize_nans)
|
||||
.cranelift_opt_level(self.wasmtime.opt_level.to_wasmtime())
|
||||
.interruptable(self.wasmtime.interruptable)
|
||||
.consume_fuel(self.wasmtime.consume_fuel);
|
||||
.consume_fuel(self.wasmtime.consume_fuel)
|
||||
.memfd(self.wasmtime.memfd);
|
||||
|
||||
// If the wasm-smith-generated module use nan canonicalization then we
|
||||
// don't need to enable it, but if it doesn't enable it already then we
|
||||
|
||||
Reference in New Issue
Block a user