Fix multi-memory condition when spectest fuzzing (#5609)

The check needs to verify that the maximum number of memories is
precisely one to ensure that multi-memory is disabled yet modules can
still have up to one memory as configured in the pooling allocator.
This commit is contained in:
Alex Crichton
2023-01-20 12:10:00 -06:00
committed by GitHub
parent e0d7c3bbe1
commit 5e8c6c9117

View File

@@ -116,8 +116,10 @@ impl Config {
}
// Make sure the runtime limits allow for the instantiation of all spec
// tests.
if config.max_memories < 1 || config.max_tables < 5 {
// tests. Note that the max memories must be precisely one since 0 won't
// instantiate spec tests and more than one is multi-memory which is
// disabled for spec tests.
if config.max_memories != 1 || config.max_tables < 5 {
return false;
}