Use SwiftShader and ANGLE for RasterDecoder fuzzing
This will hopefully catch issues where RasterDecoder instructs the
driver to make bad memory accesses (e.g. glTexImage2D with data =
nullptr and GL_PIXEL_UNPACK_BUFFER set inappropriately). The current
gpu_raster_fuzzer target uses a stub GL implementation and won't catch
these errors.
Bug: 856208
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Iea7dac66ef051a82af38ca2dde3e8374187f21ba
Reviewed-on: https://chromium-review.googlesource.com/1125141
Commit-Queue: Jonathan Backer <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
Cr-Commit-Position: refs/heads/master@{#572600}
diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn
index e926a3e..204456cc 100644
--- a/gpu/BUILD.gn
+++ b/gpu/BUILD.gn
@@ -663,4 +663,50 @@
libfuzzer_options = [ "max_len=16384" ]
}
+
+ fuzzer_test("gpu_raster_swiftshader_fuzzer") {
+ sources = [
+ "command_buffer/tests/fuzzer_main.cc",
+ ]
+
+ defines = [
+ "GPU_FUZZER_USE_RASTER_DECODER",
+ "GPU_FUZZER_USE_SWIFTSHADER",
+ ]
+
+ deps = [
+ ":gles2",
+ ":gpu",
+ "//base",
+ "//base/third_party/dynamic_annotations",
+ "//ui/gfx/geometry",
+ "//ui/gl",
+ "//ui/gl:test_support",
+ ]
+
+ libfuzzer_options = [ "max_len=16384" ]
+ }
+
+ fuzzer_test("gpu_raster_angle_fuzzer") {
+ sources = [
+ "command_buffer/tests/fuzzer_main.cc",
+ ]
+
+ defines = [
+ "GPU_FUZZER_USE_RASTER_DECODER",
+ "GPU_FUZZER_USE_ANGLE",
+ ]
+
+ deps = [
+ ":gles2",
+ ":gpu",
+ "//base",
+ "//base/third_party/dynamic_annotations",
+ "//ui/gfx/geometry",
+ "//ui/gl",
+ "//ui/gl:test_support",
+ ]
+
+ libfuzzer_options = [ "max_len=16384" ]
+ }
}