From 8ed1a8942693f0c516006eaae21a3c00def6c9a5 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Wed, 23 May 2018 12:09:41 -0400 Subject: remove SkColorSpace::MakeICC() fuzzer We're removing SkColorSpace::MakeICC() and replacing it with skcms. The equivalent skcms_Parse() is already fuzzed. Change-Id: Ic5c8f8c71976859b9892fdc6991aea90dac04eff Reviewed-on: https://skia-review.googlesource.com/129652 Auto-Submit: Mike Klein Commit-Queue: Kevin Lubick Reviewed-by: Kevin Lubick --- fuzz/coverage | 4 ++-- fuzz/fuzz.cpp | 15 --------------- 2 files changed, 2 insertions(+), 17 deletions(-) (limited to 'fuzz') diff --git a/fuzz/coverage b/fuzz/coverage index 87ba5bea37..d681d9369a 100755 --- a/fuzz/coverage +++ b/fuzz/coverage @@ -50,9 +50,9 @@ GCOV="$(realpath tools/gcov_shim)" lcov -q --gcov-tool="$GCOV" -c -b "$BUILD" -d "$BUILD" -o "$DIR"/baseline -i # Running the binary generates the real coverage information, the .gcda files. -QUEUES=("$1/api_parse_path/fuzzer0/queue/*" "$1/color_deserialize/fuzzer0/queue/*" "$1/color_icc/fuzzer0/queue/*" "$1/skcodec_scale/fuzzer0/queue/*" "$1/skcodec_mode/fuzzer0/queue/*" "$1/api_draw_functions/fuzzer0/queue/*" "$1/api_gradient/fuzzer0/queue/*" "$1/api_image_filter/fuzzer0/queue/*" "$1/api_pathop/fuzzer0/queue/*" "$1/sksl2glsl/fuzzer0/queue/*" "$1/null_canvas/fuzzer0/queue/*" "$1/pdf_canvas/fuzzer0/queue/*" "$1/n32_canvas/fuzzer0/queue/*") +QUEUES=("$1/api_parse_path/fuzzer0/queue/*" "$1/color_deserialize/fuzzer0/queue/*" "$1/skcodec_scale/fuzzer0/queue/*" "$1/skcodec_mode/fuzzer0/queue/*" "$1/api_draw_functions/fuzzer0/queue/*" "$1/api_gradient/fuzzer0/queue/*" "$1/api_image_filter/fuzzer0/queue/*" "$1/api_pathop/fuzzer0/queue/*" "$1/sksl2glsl/fuzzer0/queue/*" "$1/null_canvas/fuzzer0/queue/*" "$1/pdf_canvas/fuzzer0/queue/*" "$1/n32_canvas/fuzzer0/queue/*") -ARGS=("-n ParsePath" "-t color_deserialize" "-t icc" "-t image_scale" "-t image_mode" "-n DrawFunctions" "-n Gradients" "-n SerializedImageFilter" "-n Pathop" "-t sksl2glsl" "-n NullCanvas" "-n PDFCanvas" "-n RasterN32Canvas") +ARGS=("-n ParsePath" "-t color_deserialize" "-t image_scale" "-t image_mode" "-n DrawFunctions" "-n Gradients" "-n SerializedImageFilter" "-n Pathop" "-t sksl2glsl" "-n NullCanvas" "-n PDFCanvas" "-n RasterN32Canvas") # We can't simply pass the directories to the fuzzers because some of the fuzzes will # crash or assert, which would kill the call to fuzz prematurely. Instead we run them diff --git a/fuzz/fuzz.cpp b/fuzz/fuzz.cpp index 9857e80178..161969fb43 100644 --- a/fuzz/fuzz.cpp +++ b/fuzz/fuzz.cpp @@ -52,7 +52,6 @@ DEFINE_string2(type, t, "", "How to interpret --bytes, one of:\n" "api\n" "color_deserialize\n" "filter_fuzz (equivalent to Chrome's filter_fuzz_stub)\n" - "icc\n" "image_decode\n" "image_mode\n" "image_scale\n" @@ -72,7 +71,6 @@ static SkString try_auto_detect(SkString path, SkString* name); static void fuzz_api(sk_sp bytes, SkString name); static void fuzz_color_deserialize(sk_sp); static void fuzz_filter_fuzz(sk_sp); -static void fuzz_icc(sk_sp); static void fuzz_img2(sk_sp); static void fuzz_animated_img(sk_sp); static void fuzz_img(sk_sp, uint8_t, uint8_t); @@ -149,10 +147,6 @@ static int fuzz_file(SkString path, SkString type) { fuzz_color_deserialize(bytes); return 0; } - if (type.equals("icc")) { - fuzz_icc(bytes); - return 0; - } if (type.equals("image_decode")) { fuzz_img2(bytes); return 0; @@ -618,15 +612,6 @@ static void fuzz_skpipe(sk_sp bytes) { SkDebugf("[terminated] Success! Decoded and rendered an SkPicture from SkPipe!\n"); } -static void fuzz_icc(sk_sp bytes) { - sk_sp space(SkColorSpace::MakeICC(bytes->data(), bytes->size())); - if (!space) { - SkDebugf("[terminated] Couldn't decode ICC.\n"); - return; - } - SkDebugf("[terminated] Success! Decoded ICC.\n"); -} - static void fuzz_color_deserialize(sk_sp bytes) { sk_sp space(SkColorSpace::Deserialize(bytes->data(), bytes->size())); if (!space) { -- cgit v1.2.3