Reduce VM overhead of pooling spec tests (#6006)

This commit forces bounds checks to be used when pooling and running the
spec tests to ensure that they can be run at a reasonable degree of
parallelism. Otherwise currently the VM reservation required for the
multi-memory tests is so large that it fails to get reserved at runtime,
failing the test.

Closes #6003
This commit is contained in:
Alex Crichton
2023-03-13 14:56:47 -05:00
committed by GitHub
parent 03b5dbb3e0
commit bba49646c3

View File

@@ -97,6 +97,23 @@ fn run_wast(wast: &str, strategy: Strategy, pooling: bool) -> anyhow::Result<()>
return Ok(());
}
// Reduce the virtual memory required to run multi-memory-based tests.
//
// The configuration parameters below require that a bare minimum
// virtual address space reservation of 450*9*805*65536 == 200G be made
// to support each test. If 6G reservations are made for each linear
// memory then not that many tests can run concurrently with much else.
//
// When multiple memories are used and are configured in the pool then
// force the usage of static memories without guards to reduce the VM
// impact.
if multi_memory {
cfg.static_memory_maximum_size(0);
cfg.dynamic_memory_reserved_for_growth(0);
cfg.static_memory_guard_size(0);
cfg.dynamic_memory_guard_size(0);
}
// The limits here are crafted such that the wast tests should pass.
// However, these limits may become insufficient in the future as the wast tests change.
// If a wast test fails because of a limit being "exceeded" or if memory/table