diff options
author | 2019-03-11 16:16:45 -0400 | |
---|---|---|
committer | 2019-03-11 13:16:45 -0700 | |
commit | 169cae111ad031da1896882eec10c42e1d4b3cde (patch) | |
tree | 47fbbc4db2acf592933f23eb9d1ae439ee67c43f | |
parent | 65037d2ea8e726a7d7d3adc135e499494ffae48b (diff) |
add sksl fuzzers (#2228)
-rw-r--r-- | projects/skia/BUILD.gn.diff | 35 | ||||
-rw-r--r-- | projects/skia/Dockerfile | 7 | ||||
-rw-r--r-- | projects/skia/build.sh | 15 | ||||
-rw-r--r-- | projects/skia/sksl.options | 2 |
4 files changed, 58 insertions, 1 deletions
diff --git a/projects/skia/BUILD.gn.diff b/projects/skia/BUILD.gn.diff index d39e37ee..10114422 100644 --- a/projects/skia/BUILD.gn.diff +++ b/projects/skia/BUILD.gn.diff @@ -376,3 +376,38 @@ test_app("image_decode_incremental") { ] } +test_app("sksl2glsl") { + sources = [ + "fuzz/Fuzz.cpp", + "fuzz/FuzzCommon.cpp", + "fuzz/oss_fuzz/FuzzSKSL2GLSL.cpp", + ] + deps = [ + ":gpu_tool_utils", + ":skia", + ] +} + +test_app("sksl2spirv") { + sources = [ + "fuzz/Fuzz.cpp", + "fuzz/FuzzCommon.cpp", + "fuzz/oss_fuzz/FuzzSKSL2SPIRV.cpp", + ] + deps = [ + ":gpu_tool_utils", + ":skia", + ] +} + +test_app("sksl2metal") { + sources = [ + "fuzz/Fuzz.cpp", + "fuzz/FuzzCommon.cpp", + "fuzz/oss_fuzz/FuzzSKSL2Metal.cpp", + ] + deps = [ + ":gpu_tool_utils", + ":skia", + ] +} diff --git a/projects/skia/Dockerfile b/projects/skia/Dockerfile index 4ee981a8..e2ff521b 100644 --- a/projects/skia/Dockerfile +++ b/projects/skia/Dockerfile @@ -70,6 +70,8 @@ RUN wget -O $SRC/skia/skjson_seed_corpus.zip https://storage.googleapis.com/skia RUN wget -O $SRC/skia/api_polyutils_seed_corpus.zip https://storage.googleapis.com/skia-fuzzer/oss-fuzz/api_polyutils_seed_corpus.zip +RUN wget -O $SRC/skia/sksl_seed_corpus.zip https://storage.googleapis.com/skia-fuzzer/oss-fuzz/sksl_seed_corpus.zip + COPY build.sh $SRC/ COPY skia.diff $SRC/skia/skia.diff @@ -100,6 +102,11 @@ COPY api_fuzzers.options $SRC/skia/api_pathop.options COPY api_fuzzers.options $SRC/skia/api_polyutils.options COPY api_fuzzers.options $SRC/skia/api_raster_n32_canvas.options +# SKSL fuzzers can share options +COPY sksl.options $SRC/skia/sksl2glsl.options +COPY sksl.options $SRC/skia/sksl2spirv.options +COPY sksl.options $SRC/skia/sksl2metal.options + COPY json.dict $SRC/skia/json.dict COPY BUILD.gn.diff $SRC/skia/BUILD.gn.diff diff --git a/projects/skia/build.sh b/projects/skia/build.sh index e49b9a3f..48dee4fb 100644 --- a/projects/skia/build.sh +++ b/projects/skia/build.sh @@ -99,7 +99,8 @@ $SRC/depot_tools/ninja -C out/Fuzz region_deserialize region_set_path \ jpeg_encoder webp_encoder skottie_json \ textblob_deserialize skjson \ api_null_canvas api_image_filter api_pathop \ - api_polyutils android_codec image_decode_incremental + api_polyutils android_codec image_decode_incremental \ + sksl2glsl sksl2spirv sksl2metal $SRC/depot_tools/ninja -C out/Fuzz_mem_constraints image_filter_deserialize \ api_raster_n32_canvas \ @@ -206,3 +207,15 @@ cp ./image_decode_seed_corpus.zip $OUT/android_codec_seed_corpus.zip. cp out/Fuzz/image_decode_incremental $OUT/image_decode_incremental cp ./image_decode_incremental.options $OUT/image_decode_incremental.options cp ./image_decode_seed_corpus.zip $OUT/image_decode_incremental_seed_corpus.zip + +cp out/Fuzz/sksl2glsl $OUT/sksl2glsl +cp ./sksl2glsl.options $OUT/sksl2glsl.options +cp ./sksl_seed_corpus.zip $OUT/sksl2glsl_seed_corpus.zip + +cp out/Fuzz/sksl2spirv $OUT/sksl2spirv +cp ./sksl2spirv.options $OUT/sksl2spirv.options +cp ./sksl_seed_corpus.zip $OUT/sksl2spirv_seed_corpus.zip + +cp out/Fuzz/sksl2metal $OUT/sksl2metal +cp ./sksl2metal.options $OUT/sksl2metal.options +cp ./sksl_seed_corpus.zip $OUT/sksl2metal_seed_corpus.zip diff --git a/projects/skia/sksl.options b/projects/skia/sksl.options new file mode 100644 index 00000000..648edd48 --- /dev/null +++ b/projects/skia/sksl.options @@ -0,0 +1,2 @@ +[libfuzzer] +max_len = 3000
\ No newline at end of file |