spirv-fuzz: Pass on validator options during shrinking (#3317)

Fixes an issue where the shrinker's validator options were not
actually being passed to the validator.
This commit is contained in:
Alastair Donaldson 2020-04-27 14:25:46 +01:00 committed by GitHub
parent 88faf63ad3
commit 94d6002dc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,7 +107,8 @@ Shrinker::ShrinkerResultStatus Shrinker::Run(
}
// Initial binary should be valid.
if (!tools.Validate(&binary_in[0], binary_in.size())) {
if (!tools.Validate(&binary_in[0], binary_in.size(),
impl_->validator_options)) {
impl_->consumer(SPV_MSG_INFO, nullptr, {},
"Initial binary is invalid; stopping.");
return Shrinker::ShrinkerResultStatus::kInitialBinaryInvalid;