From bba49646c3bf2eff168cb54607302dbf9a448177 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 13 Mar 2023 14:56:47 -0500 Subject: [PATCH] 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 --- tests/all/wast.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/all/wast.rs b/tests/all/wast.rs index 260e3bc003..994d272692 100644 --- a/tests/all/wast.rs +++ b/tests/all/wast.rs @@ -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