Fix table element limits in spectest fuzzer (#3888)
Ensure that there's enough table elements allowed to execute the spec tests since some tests have a minimum required.
This commit is contained in:
@@ -354,6 +354,7 @@ impl Config {
|
|||||||
{
|
{
|
||||||
limits.memories = 1;
|
limits.memories = 1;
|
||||||
limits.tables = 5;
|
limits.tables = 5;
|
||||||
|
limits.table_elements = 1_000;
|
||||||
// Set a lower bound of 10 pages as the spec tests define memories with at
|
// Set a lower bound of 10 pages as the spec tests define memories with at
|
||||||
// least a few pages and some tests do memory grow operations.
|
// least a few pages and some tests do memory grow operations.
|
||||||
limits.memory_pages = std::cmp::max(limits.memory_pages, 10);
|
limits.memory_pages = std::cmp::max(limits.memory_pages, 10);
|
||||||
@@ -370,6 +371,7 @@ impl Config {
|
|||||||
/// Converts this to a `wasmtime::Config` object
|
/// Converts this to a `wasmtime::Config` object
|
||||||
pub fn to_wasmtime(&self) -> wasmtime::Config {
|
pub fn to_wasmtime(&self) -> wasmtime::Config {
|
||||||
crate::init_fuzzing();
|
crate::init_fuzzing();
|
||||||
|
log::debug!("creating wasmtime config with {:#?}", self.wasmtime);
|
||||||
|
|
||||||
let mut cfg = wasmtime::Config::new();
|
let mut cfg = wasmtime::Config::new();
|
||||||
cfg.wasm_bulk_memory(true)
|
cfg.wasm_bulk_memory(true)
|
||||||
|
|||||||
@@ -539,7 +539,7 @@ pub fn make_api_calls(api: generators::api::ApiCalls) {
|
|||||||
pub fn spectest(mut fuzz_config: generators::Config, test: generators::SpecTest) {
|
pub fn spectest(mut fuzz_config: generators::Config, test: generators::SpecTest) {
|
||||||
crate::init_fuzzing();
|
crate::init_fuzzing();
|
||||||
fuzz_config.set_spectest_compliant();
|
fuzz_config.set_spectest_compliant();
|
||||||
log::debug!("running {:?} with {:?}", test.file, fuzz_config);
|
log::debug!("running {:?}", test.file);
|
||||||
let mut wast_context = WastContext::new(fuzz_config.to_store());
|
let mut wast_context = WastContext::new(fuzz_config.to_store());
|
||||||
wast_context.register_spectest().unwrap();
|
wast_context.register_spectest().unwrap();
|
||||||
wast_context
|
wast_context
|
||||||
|
|||||||
Reference in New Issue
Block a user