Fix failing fuzzers with too-small instance sizes (#3873)

The recent removal of `ModuleLimits` meant that the update to the
fuzzers could quickly fail where the instance size limit was set to
something small (like 0) and then nothing would succeed in compilation.
This allows the modules to fail to compile and then continues to the
next fuzz input in these situations.
This commit is contained in:
Alex Crichton
2022-03-02 13:34:04 -06:00
committed by GitHub
parent ad5ce38467
commit 2f48c890a8

View File

@@ -260,6 +260,15 @@ fn compile_module(
if string.contains("minimum element size") { if string.contains("minimum element size") {
return None; return None;
} }
// Allow modules-failing-to-compile which exceed the requested
// size for each instance. This is something that is difficult
// to control and ensure it always suceeds, so we simply have a
// "random" instance size limit and if a module doesn't fit we
// move on to the next fuzz input.
if string.contains("instance allocation for this module requires") {
return None;
}
} }
panic!("failed to compile module: {:?}", e); panic!("failed to compile module: {:?}", e);