fuzz: allow generating shared memories (#4266)

`wasm-smith` v0.11 has support for generating shared memories when the
`threads_enabled` configuration flag is set. This change turns on that
flag occasionally. This also upgrades `wasm-smith` to v0.11.1 to always
generate shared memory with a known maximum.
This commit is contained in:
Andrew Brown
2022-06-14 09:50:41 -07:00
committed by GitHub
parent 72f0e46fdb
commit 22e13fee1d
5 changed files with 50 additions and 23 deletions

View File

@@ -17,9 +17,12 @@ fn run(data: &[u8]) -> Result<()> {
config.set_differential_config();
// Enable features that v8 has implemented
config.module_config.config.simd_enabled = true;
config.module_config.config.bulk_memory_enabled = true;
config.module_config.config.reference_types_enabled = true;
config.module_config.config.simd_enabled = u.arbitrary()?;
config.module_config.config.bulk_memory_enabled = u.arbitrary()?;
config.module_config.config.reference_types_enabled = u.arbitrary()?;
// FIXME: to enable fuzzing with the threads proposal, see
// https://github.com/bytecodealliance/wasmtime/issues/4268.
// config.module_config.config.threads_enabled = u.arbitrary()?;
// Allow multiple tables, as set_differential_config() assumes reference
// types are disabled and therefore sets max_tables to 1