| # Copyright 2015 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # Individual libfuzzer tests that didn't find their home yet. |
| |
| import("//build/config/features.gni") |
| import("//testing/libfuzzer/fuzzer_test.gni") |
| import("//third_party/protobuf/proto_library.gni") |
| |
| # root BUILD depends on this target. Needed for package discovery |
| group("fuzzers") { |
| } |
| |
| fuzzer_test("empty_fuzzer") { |
| sources = [ |
| "empty_fuzzer.cc", |
| ] |
| additional_configs = [ "//testing/libfuzzer:no_clusterfuzz" ] |
| } |
| |
| fuzzer_test("courgette_fuzzer") { |
| sources = [ |
| "courgette_fuzzer.cc", |
| ] |
| deps = [ |
| "//base", |
| "//courgette:courgette_lib", |
| ] |
| additional_configs = [ "//testing/libfuzzer:no_clusterfuzz" ] |
| } |
| |
| fuzzer_test("language_detection_fuzzer") { |
| sources = [ |
| "language_detection_fuzzer.cc", |
| ] |
| deps = [ |
| "//base", |
| "//components/translate/core/language_detection:language_detection", |
| ] |
| } |
| |
| fuzzer_test("snappy_compress_fuzzer") { |
| sources = [ |
| "snappy_compress_fuzzer.cc", |
| ] |
| deps = [ |
| "//base", |
| "//third_party/snappy:snappy", |
| ] |
| seed_corpus = "//third_party/snappy/src/testdata" |
| } |
| |
| fuzzer_test("snappy_uncompress_fuzzer") { |
| sources = [ |
| "snappy_uncompress_fuzzer.cc", |
| ] |
| deps = [ |
| "//third_party/snappy:snappy", |
| ] |
| seed_corpus = "//third_party/snappy/src/testdata" |
| } |
| |
| fuzzer_test("template_url_parser_fuzzer") { |
| sources = [ |
| "template_url_parser_fuzzer.cc", |
| ] |
| deps = [ |
| "//base", |
| "//base:i18n", |
| "//components/search_engines:search_engines", |
| ] |
| dict = "dicts/xml.dict" |
| libfuzzer_options = [ "max_len=4096" ] |
| } |
| |
| fuzzer_test("url_parse_proto_fuzzer") { |
| sources = [ |
| "url_parse_proto_fuzzer.cc", |
| ] |
| deps = [ |
| ":url_proto", |
| "//base", |
| "//base:i18n", |
| "//third_party/libprotobuf-mutator", |
| "//url:url", |
| ] |
| } |
| |
| proto_library("url_proto") { |
| sources = [ |
| "url.proto", |
| ] |
| } |
| |
| fuzzer_test("usrsctp_fuzzer") { |
| sources = [ |
| "usrsctp_fuzzer.cc", |
| ] |
| deps = [ |
| "//third_party/usrsctp", |
| ] |
| } |
| |
| fuzzer_test("libsrtp_fuzzer") { |
| sources = [ |
| "libsrtp_fuzzer.cc", |
| ] |
| deps = [ |
| "//third_party/libsrtp", |
| ] |
| libfuzzer_options = [ "max_len=1500" ] |
| } |
| |
| libpng_seed_corpuses = [ |
| "//components/viz/test/data", |
| "//third_party/blink/web_tests/images/png-suite/samples", |
| "//third_party/blink/web_tests/images/resources/pngfuzz", |
| ] |
| |
| fuzzer_test("gfx_png_image_fuzzer") { |
| sources = [ |
| "gfx_png_image_fuzzer.cc", |
| ] |
| deps = [ |
| "//base", |
| "//ui/gfx", |
| ] |
| dict = "dicts/png.dict" |
| seed_corpuses = libpng_seed_corpuses |
| } |
| |
| fuzzer_test("libxml_xml_read_memory_fuzzer") { |
| sources = [ |
| "libxml_xml_read_memory_fuzzer.cc", |
| ] |
| deps = [ |
| "//third_party/libxml:libxml", |
| ] |
| dict = "dicts/generated/libxml_xml_read_memory_fuzzer.dict" |
| } |
| |
| fuzzer_test("libpng_progressive_read_fuzzer") { |
| sources = [ |
| "libpng_read_fuzzer.cc", |
| ] |
| deps = [ |
| "//base", |
| "//third_party/libpng", |
| ] |
| dict = "dicts/png.dict" |
| seed_corpuses = libpng_seed_corpuses |
| } |
| |
| fuzzer_test("v8_script_parser_fuzzer") { |
| sources = [] |
| deps = [ |
| "//v8:parser_fuzzer", |
| ] |
| dict = "dicts/generated/javascript.dict" |
| seed_corpus = "//v8/test/mjsunit/regress/" |
| libfuzzer_options = [ "only_ascii=1" ] |
| environment_variables = [ "AFL_DRIVER_DONT_DEFER=1" ] |
| } |
| |
| fuzzer_test("v8_json_parser_fuzzer") { |
| sources = [] |
| deps = [ |
| "//v8:json_fuzzer", |
| ] |
| dict = "dicts/json.dict" |
| environment_variables = [ "AFL_DRIVER_DONT_DEFER=1" ] |
| } |
| |
| fuzzer_test("v8_regexp_parser_fuzzer") { |
| sources = [] |
| deps = [ |
| "//v8:regexp_fuzzer", |
| ] |
| dict = "dicts/regexp.dict" |
| seed_corpus = "//v8/test/fuzzer/regexp/" |
| libfuzzer_options = [ "max_len=64" ] |
| environment_variables = [ "AFL_DRIVER_DONT_DEFER=1" ] |
| } |
| |
| fuzzer_test("v8_regexp_builtins_fuzzer") { |
| sources = [] |
| deps = [ |
| "//v8:regexp_builtins_fuzzer", |
| ] |
| environment_variables = [ "AFL_DRIVER_DONT_DEFER=1" ] |
| } |
| |
| fuzzer_test("v8_multi_return_fuzzer") { |
| sources = [] |
| deps = [ |
| "//v8:multi_return_fuzzer", |
| ] |
| asan_options = [ |
| "allow_user_segv_handler=1", |
| "handle_sigtrap=1", |
| ] |
| msan_options = [ "handle_sigtrap=1" ] |
| ubsan_options = [ "handle_sigtrap=1" ] |
| environment_variables = [ "AFL_DRIVER_DONT_DEFER=1" ] |
| } |
| |
| fuzzer_test("v8_wasm_code_fuzzer") { |
| sources = [] |
| deps = [ |
| "//v8:wasm_code_fuzzer", |
| ] |
| libfuzzer_options = [ "max_len=500" ] |
| asan_options = [ |
| "allow_user_segv_handler=1", |
| "handle_sigtrap=1", |
| ] |
| msan_options = [ "handle_sigtrap=1" ] |
| ubsan_options = [ "handle_sigtrap=1" ] |
| environment_variables = [ "AFL_DRIVER_DONT_DEFER=1" ] |
| } |
| |
| fuzzer_test("v8_wasm_compile_fuzzer") { |
| sources = [] |
| deps = [ |
| "//v8:wasm_compile_fuzzer", |
| ] |
| libfuzzer_options = [ "max_len=500" ] |
| asan_options = [ |
| "allow_user_segv_handler=1", |
| "handle_sigtrap=1", |
| ] |
| msan_options = [ "handle_sigtrap=1" ] |
| ubsan_options = [ "handle_sigtrap=1" ] |
| environment_variables = [ "AFL_DRIVER_DONT_DEFER=1" ] |
| } |
| |
| fuzzer_test("v8_wasm_fuzzer") { |
| sources = [] |
| deps = [ |
| "//v8:wasm_fuzzer", |
| ] |
| dict = "dicts/v8_wasm.dict" |
| seed_corpus = "//v8/test/fuzzer/wasm_corpus/" |
| libfuzzer_options = [ "max_len=500" ] |
| asan_options = [ |
| "allow_user_segv_handler=1", |
| "handle_sigtrap=1", |
| ] |
| msan_options = [ "handle_sigtrap=1" ] |
| ubsan_options = [ "handle_sigtrap=1" ] |
| environment_variables = [ "AFL_DRIVER_DONT_DEFER=1" ] |
| } |
| |
| fuzzer_test("v8_wasm_async_fuzzer") { |
| sources = [] |
| deps = [ |
| "//v8:wasm_async_fuzzer", |
| ] |
| dict = "dicts/v8_wasm.dict" |
| seed_corpus = "//v8/test/fuzzer/wasm_corpus/" |
| libfuzzer_options = [ "max_len=500" ] |
| asan_options = [ |
| "allow_user_segv_handler=1", |
| "handle_sigtrap=1", |
| ] |
| msan_options = [ "handle_sigtrap=1" ] |
| ubsan_options = [ "handle_sigtrap=1" ] |
| environment_variables = [ "AFL_DRIVER_DONT_DEFER=1" ] |
| } |
| |
| fuzzer_test("convert_woff2ttf_fuzzer") { |
| sources = [ |
| "convert_woff2ttf_fuzzer.cc", |
| ] |
| deps = [ |
| "//third_party/woff2:woff2_dec", |
| ] |
| seed_corpus = "//testing/libfuzzer/fuzzers/woff2_corpus" |
| libfuzzer_options = [ "max_len=803500" ] |
| } |
| |
| fuzzer_test("flatbuffers_verifier_fuzzer") { |
| sources = [ |
| "flatbuffers_verifier_fuzzer.cc", |
| ] |
| deps = [ |
| "//third_party/flatbuffers", |
| "//third_party/flatbuffers:flatbuffers_samplebuffer", |
| ] |
| libfuzzer_options = [ "max_len=1024" ] |
| seed_corpus = "//testing/libfuzzer/fuzzers/flatbuffers_corpus" |
| } |
| |
| fuzzer_test("skia_path_fuzzer") { |
| sources = [ |
| "skia_path_common.cc", |
| "skia_path_common.h", |
| "skia_path_fuzzer.cc", |
| ] |
| deps = [ |
| "//skia", |
| ] |
| libfuzzer_options = [ "max_len=256" ] |
| if (is_debug) { |
| # Disabled due to crashing on SkASSERT (crbug.com/642750, crbug.com/643275). |
| additional_configs = [ "//testing/libfuzzer:no_clusterfuzz" ] |
| } |
| } |
| |
| fuzzer_test("skia_pathop_fuzzer") { |
| sources = [ |
| "skia_path_common.cc", |
| "skia_path_common.h", |
| "skia_pathop_fuzzer.cc", |
| ] |
| deps = [ |
| "//base", |
| "//skia", |
| ] |
| libfuzzer_options = [ "max_len=512" ] |
| if (is_debug) { |
| # Disabled due to crashing on SkASSERT (crbug.com/642750, crbug.com/643275). |
| additional_configs = [ "//testing/libfuzzer:no_clusterfuzz" ] |
| } |
| } |
| |
| fuzzer_test("prtime_fuzzer") { |
| sources = [ |
| "prtime_fuzzer.cc", |
| ] |
| deps = [ |
| "//base", |
| ] |
| dict = "dicts/prtime.dict" |
| libfuzzer_options = [ "max_len=1024" ] |
| } |
| |
| fuzzer_test("angle_translator_fuzzer") { |
| sources = [] |
| deps = [ |
| "//third_party/angle:translator_fuzzer", |
| ] |
| libfuzzer_options = [ "max_len=1000" ] |
| dict = "dicts/webgl-glsl.dict" |
| } |
| |
| if (target_cpu == "x86" || target_cpu == "x64") { |
| fuzzer_test("swiftshader_vertex_routine_fuzzer") { |
| sources = [] |
| deps = [ |
| "//third_party/swiftshader:vertex_routine_fuzzer", |
| ] |
| } |
| } |
| |
| fuzzer_test("sha1_fuzzer") { |
| sources = [ |
| "sha1_fuzzer.cc", |
| ] |
| deps = [ |
| "//base", |
| ] |
| } |
| |
| fuzzer_test("hash_fuzzer") { |
| sources = [ |
| "hash_fuzzer.cc", |
| ] |
| deps = [ |
| "//base", |
| ] |
| } |
| |
| action("gen_javascript_parser_proto") { |
| # Only targets in this file and the top-level visibility target can |
| # depend on this. |
| visibility = [ |
| ":*", |
| "//:gn_visibility", |
| ] |
| |
| script = "generate_javascript_parser_proto.py" |
| |
| sources = [ |
| "dicts/javascript_parser_proto.dict", |
| ] |
| |
| outputs = [ |
| "$target_gen_dir/javascript_parser.proto", |
| "$target_gen_dir/javascript_parser_proto_to_string.cc", |
| ] |
| |
| args = rebase_path(outputs, root_build_dir) + |
| rebase_path(sources, root_build_dir) |
| } |
| |
| proto_library("javascript_parser_proto") { |
| sources = [ |
| "$target_gen_dir/javascript_parser.proto", |
| ] |
| deps = [ |
| ":gen_javascript_parser_proto", |
| ] |
| proto_out_dir = "" |
| } |
| |
| fuzzer_test("javascript_parser_proto_fuzzer") { |
| generated_sources = [ "$target_gen_dir/javascript_parser_proto_to_string.cc" ] |
| sources = [ |
| "javascript_parser_proto_fuzzer.cc", |
| "javascript_parser_proto_to_string.h", |
| ] |
| deps = [ |
| ":gen_javascript_parser_proto", |
| ":javascript_parser_proto", |
| "//third_party/libprotobuf-mutator", |
| "//v8:v8", |
| "//v8:v8_libplatform", |
| ] |
| } |
| |
| fuzzer_test("v8_fully_instrumented_fuzzer") { |
| sources = [ |
| "v8_fuzzer.cc", |
| ] |
| deps = [ |
| "//base", |
| "//v8:v8", |
| "//v8:v8_libplatform", |
| ] |
| dict = "dicts/generated/javascript.dict" |
| asan_options = [ |
| "allow_user_segv_handler=1", |
| "handle_sigtrap=1", |
| ] |
| msan_options = [ "handle_sigtrap=1" ] |
| ubsan_options = [ "handle_sigtrap=1" ] |
| libfuzzer_options = [ "only_ascii=1" ] |
| } |
| |
| fuzzer_test("skia_image_filter_proto_fuzzer") { |
| sources = [ |
| "skia_image_filter_proto_fuzzer.cc", |
| ] |
| |
| deps = [ |
| "//base", |
| "//base/test:test_support", |
| "//skia", |
| "//testing/libfuzzer/proto:skia_image_filter_converter", |
| "//testing/libfuzzer/proto:skia_image_filter_proto", |
| "//third_party/libprotobuf-mutator", |
| ] |
| } |