Remove Full SPIRV-Cross fuzzers

BUG=chromium:972753

Change-Id: Ic61d5d0ed44b0693f4df09b1f9c34bd928609c3a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8080
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Ryan Harrison 2019-06-12 08:49:15 +00:00 committed by Commit Bot service account
parent 8f813ac8a2
commit 3e51fada29
7 changed files with 0 additions and 176 deletions

View File

@ -787,11 +787,8 @@ group("dawn_fuzzers") {
testonly = true
deps = [
"src/fuzzers:dawn_spirv_cross_glsl_fast_fuzzer",
"src/fuzzers:dawn_spirv_cross_glsl_full_fuzzer",
"src/fuzzers:dawn_spirv_cross_hlsl_fast_fuzzer",
"src/fuzzers:dawn_spirv_cross_hlsl_full_fuzzer",
"src/fuzzers:dawn_spirv_cross_msl_fast_fuzzer",
"src/fuzzers:dawn_spirv_cross_msl_full_fuzzer",
"src/fuzzers:dawn_wire_server_and_frontend_fuzzer",
]
}

View File

@ -92,19 +92,6 @@ dawn_fuzzer_test("dawn_spirv_cross_glsl_fast_fuzzer") {
asan_options = [ "allow_user_segv_handler=1" ]
}
# TODO(rharrison): Remove asan_options once signal trap is no longer
# needed.
# Varies both the options and input data
dawn_fuzzer_test("dawn_spirv_cross_glsl_full_fuzzer") {
sources = [
"DawnSPIRVCrossGLSLFullFuzzer.cpp",
]
deps = [
":dawn_spirv_cross_fuzzer_common",
]
asan_options = [ "allow_user_segv_handler=1" ]
}
# TODO(rharrison): Remove asan_options once signal trap is no longer
# needed.
# Uses Dawn specific options and varies input data
@ -118,19 +105,6 @@ dawn_fuzzer_test("dawn_spirv_cross_hlsl_fast_fuzzer") {
asan_options = [ "allow_user_segv_handler=1" ]
}
# TODO(rharrison): Remove asan_options once signal trap is no longer
# needed.
# Varies both the options and input data
dawn_fuzzer_test("dawn_spirv_cross_hlsl_full_fuzzer") {
sources = [
"DawnSPIRVCrossHLSLFullFuzzer.cpp",
]
deps = [
":dawn_spirv_cross_fuzzer_common",
]
asan_options = [ "allow_user_segv_handler=1" ]
}
# TODO(rharrison): Remove asan_options once signal trap is no longer
# needed.
# Uses Dawn specific options and varies input data
@ -144,19 +118,6 @@ dawn_fuzzer_test("dawn_spirv_cross_msl_fast_fuzzer") {
asan_options = [ "allow_user_segv_handler=1" ]
}
# TODO(rharrison): Remove asan_options once signal trap is no longer
# needed.
# Varies both the options and input data
dawn_fuzzer_test("dawn_spirv_cross_msl_full_fuzzer") {
sources = [
"DawnSPIRVCrossMSLFullFuzzer.cpp",
]
deps = [
":dawn_spirv_cross_fuzzer_common",
]
asan_options = [ "allow_user_segv_handler=1" ]
}
dawn_fuzzer_test("dawn_wire_server_and_frontend_fuzzer") {
sources = [
"DawnWireServerAndFrontendFuzzer.cpp",

View File

@ -76,15 +76,4 @@ namespace DawnSPIRVCrossFuzzer {
return 0;
}
int RunWithOptions(const uint8_t* data, size_t size, TaskWithOptions task) {
shaderc_spvc::CompileOptions options;
size_t used = options.SetForFuzzing(data, size);
if (used == 0) {
// not enough data to set options
return 0;
}
return Run(data + used, size - used, std::bind(task, std::placeholders::_1, options));
}
} // namespace DawnSPIRVCrossFuzzer

View File

@ -30,8 +30,4 @@ namespace DawnSPIRVCrossFuzzer {
// Used to fuzz by mutating the input data, but with fixed options to the compiler
int Run(const uint8_t* data, size_t size, Task task);
// Used to fuzz by mutating both the input data and options to the compiler
int RunWithOptions(const uint8_t* data, size_t size, TaskWithOptions task);
} // namespace DawnSPIRVCrossFuzzer

View File

@ -1,40 +0,0 @@
// Copyright 2018 The Dawn Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <cstdint>
#include <string>
#include <vector>
#include "DawnSPIRVCrossFuzzer.h"
namespace {
int GLSLFullFuzzTask(const std::vector<uint32_t>& input, shaderc_spvc::CompileOptions options) {
shaderc_spvc::Compiler compiler;
if (!compiler.IsValid()) {
return 0;
}
DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&compiler, &input, &options]() {
compiler.CompileSpvToGlsl(input.data(), input.size(), options);
});
return 0;
}
} // namespace
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
return DawnSPIRVCrossFuzzer::RunWithOptions(data, size, GLSLFullFuzzTask);
}

View File

@ -1,39 +0,0 @@
// Copyright 2018 The Dawn Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <cstdint>
#include <string>
#include <vector>
#include "DawnSPIRVCrossFuzzer.h"
namespace {
int FuzzTask(const std::vector<uint32_t>& input, shaderc_spvc::CompileOptions options) {
shaderc_spvc::Compiler compiler;
if (!compiler.IsValid()) {
return 0;
}
DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&compiler, &input, &options]() {
compiler.CompileSpvToHlsl(input.data(), input.size(), options);
});
return 0;
}
} // namespace
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
return DawnSPIRVCrossFuzzer::RunWithOptions(data, size, FuzzTask);
}

View File

@ -1,40 +0,0 @@
// Copyright 2018 The Dawn Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <cstdint>
#include <string>
#include <vector>
#include "DawnSPIRVCrossFuzzer.h"
namespace {
int FuzzTask(const std::vector<uint32_t>& input, shaderc_spvc::CompileOptions options) {
shaderc_spvc::Compiler compiler;
if (!compiler.IsValid()) {
return 0;
}
DawnSPIRVCrossFuzzer::ExecuteWithSignalTrap([&compiler, &input, &options]() {
compiler.CompileSpvToMsl(input.data(), input.size(), options);
});
return 0;
}
} // namespace
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
return DawnSPIRVCrossFuzzer::RunWithOptions(data, size, FuzzTask);
}