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:
@@ -260,6 +260,15 @@ fn compile_module(
|
||||
if string.contains("minimum element size") {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user