From 94d6002dc53496d8df2701a784640be16e628812 Mon Sep 17 00:00:00 2001 From: Alastair Donaldson Date: Mon, 27 Apr 2020 14:25:46 +0100 Subject: [PATCH] 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. --- source/fuzz/shrinker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/fuzz/shrinker.cpp b/source/fuzz/shrinker.cpp index b8e414536..002e8a7ef 100644 --- a/source/fuzz/shrinker.cpp +++ b/source/fuzz/shrinker.cpp @@ -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;