From 5a536347649b3b76a4ddb41ae08967a30118d10a Mon Sep 17 00:00:00 2001 From: Alastair Donaldson Date: Thu, 29 Jul 2021 15:14:27 +0000 Subject: [PATCH] Update SPIR-V Tools fuzzer Updates spirv-tools DEPS to pull in some recent spirv-fuzz changes, and modifies the SPIR-V Tools fuzzer so that inapplicable transformations are ignored. Change-Id: Ibdea6e9bc35224efe148133eced341168f7ce7b7 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60209 Auto-Submit: Alastair Donaldson Kokoro: Kokoro Reviewed-by: Ryan Harrison Commit-Queue: Ryan Harrison --- DEPS | 2 +- fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.cc | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 44d816c42a..8ff14997f4 100644 --- a/DEPS +++ b/DEPS @@ -13,7 +13,7 @@ vars = { 'gpuweb_cts_revision': '177a4faf0a7ce6f8c64b42a715c634e363912a74', 'protobuf_revision': 'fde7cf7358ec7cd69e8db9be4f1fa6a5c431386a', 'spirv_headers_revision': '1d4e3a7e3a04ba205ed8cb1485f7cb7369bec609', - 'spirv_tools_revision': '640b17b5fbc65f2aed9106ad96ba40c51fa20195', + 'spirv_tools_revision': '9c4481419ec1710d1b098982ecffda6b7fad88a9', 'testing_revision': '2691851e49de541c3fe42fa8692ddcdee938162f', } diff --git a/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.cc b/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.cc index dca10f1f22..c588813e4b 100644 --- a/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.cc +++ b/fuzzers/tint_spirv_tools_fuzzer/spirv_fuzz_mutator.cc @@ -49,6 +49,9 @@ SpirvFuzzMutator::SpirvFuzzMutator( std::make_unique(ir_context.get()), validator_options_); + // The value 'true' is passed for ignore_inapplicable_transformations so that + // fuzzing continues even when transformations that should be applicable turn + // out to be inapplicable. auto fuzzer_context = std::make_unique( std::make_unique(seed), spvtools::fuzz::FuzzerContext::GetMinFreshId(ir_context.get()), false); @@ -56,7 +59,7 @@ SpirvFuzzMutator::SpirvFuzzMutator( std::move(ir_context), std::move(transformation_context), std::move(fuzzer_context), util::GetBufferMessageConsumer(errors_.get()), donors, enable_all_passes, repeated_pass_strategy, - validate_after_each_pass, validator_options_); + validate_after_each_pass, validator_options_, true); } Mutator::Result SpirvFuzzMutator::Mutate() {