Prevent virtual memory OOM in spectest fuzzing (#4872)
This commit hard-codes the pooling allocator's limit of linear memories to 1 when used with fuzzing the spec tests themselves. This prevents the number from being set too high and hitting a virtual-memory-based OOM due to the virtual memory reservation of the pooling allocator being too large.
This commit is contained in:
@@ -131,7 +131,7 @@ impl Config {
|
|||||||
// required to actually run the spec tests. Fuzz-generated inputs
|
// required to actually run the spec tests. Fuzz-generated inputs
|
||||||
// may have limits less than these thresholds which would cause the
|
// may have limits less than these thresholds which would cause the
|
||||||
// spec tests to fail which isn't particularly interesting.
|
// spec tests to fail which isn't particularly interesting.
|
||||||
limits.memories = limits.memories.max(1);
|
limits.memories = 1;
|
||||||
limits.tables = limits.memories.max(5);
|
limits.tables = limits.memories.max(5);
|
||||||
limits.table_elements = limits.memories.max(1_000);
|
limits.table_elements = limits.memories.max(1_000);
|
||||||
limits.memory_pages = limits.memory_pages.max(900);
|
limits.memory_pages = limits.memory_pages.max(900);
|
||||||
|
|||||||
Reference in New Issue
Block a user