#
# Copyright 2020 Google LLC
#
# 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
#
#     https://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.

# Simple fuzz targets that demonstrate the Bazel extension functionality and
# serve as regression tests. Targets that are expected to crash or hang are
# disabled in the OSS-Fuzz integration using the "no-oss-fuzz" tag.

load("//fuzzing:cc_defs.bzl", "cc_fuzz_test")

cc_fuzz_test(
    name = "empty_fuzz_test",
    srcs = ["empty_fuzz_test.cc"],
)

filegroup(
    name = "corpus_filegroup",
    srcs = ["corpus_1.txt"] + glob(["corpus_dir/**"]),
)

# This target shows how to create a fuzz test target with corpus files.
cc_fuzz_test(
    name = "empty_fuzz_test_with_corpus",
    srcs = ["empty_fuzz_test.cc"],
    corpus = [
        "corpus_0.txt",
        ":corpus_filegroup",
        "test_corpus_dir",
    ],
)

# This target shows how to create a fuzz test target with dictionaries.
cc_fuzz_test(
    name = "empty_fuzz_test_with_dict",
    srcs = ["empty_fuzz_test.cc"],
    corpus = [
        "corpus_0.txt",
        ":corpus_filegroup",
        "test_corpus_dir",
    ],
    dicts = [
        "dictionaries/valid_part1.dict",
        "dictionaries/valid_part2.dict",
    ],
)

cc_fuzz_test(
    name = "fuzzed_data_provider_fuzz_test",
    srcs = ["fuzzed_data_provider_fuzz_test.cc"],
    target_compatible_with = select({
        "//:clang": [],
        "//conditions:default": ["@platforms//:incompatible"],
    }),
)

cc_fuzz_test(
    name = "hang_fuzz_test",
    srcs = ["hang_fuzz_test.cc"],
    tags = [
        "manual",
        "no-oss-fuzz",
    ],
)

cc_fuzz_test(
    name = "input_buffer_overflow_fuzz_test",
    srcs = ["input_buffer_overflow_fuzz_test.cc"],
    tags = [
        "no-oss-fuzz",
    ],
)

# This test is designed to trigger an uninitialized memory issue.
cc_fuzz_test(
    name = "msan_fuzz_test",
    srcs = ["msan_fuzz_test.cc"],
    copts = ["-Wno-uninitialized"],
    tags = [
        "no-oss-fuzz",
    ],
)

cc_fuzz_test(
    name = "new_buffer_overflow_fuzz_test",
    srcs = ["new_buffer_overflow_fuzz_test.cc"],
    tags = [
        "no-oss-fuzz",
    ],
)

cc_fuzz_test(
    name = "oom_fuzz_test",
    srcs = ["oom_fuzz_test.cc"],
    tags = [
        "manual",
        "no-oss-fuzz",
    ],
)

cc_fuzz_test(
    name = "re2_fuzz_test",
    srcs = ["re2_fuzz_test.cc"],
    deps = [
        "@re2",
    ],
)

cc_fuzz_test(
    name = "runfiles_fuzz_test",
    srcs = ["runfiles_fuzz_test.cc"],
    data = [
        ":corpus_0.txt",
    ],
    deps = [
        "@bazel_tools//tools/cpp/runfiles",
    ],
)

cc_fuzz_test(
    name = "ubsan_int_overflow_fuzz_test",
    srcs = ["ubsan_int_overflow_fuzz_test.cc"],
    tags = [
        "no-oss-fuzz",
    ],
)

cc_fuzz_test(
    name = "ubsan_function_ptr_fuzz_test",
    srcs = ["ubsan_function_ptr_fuzz_test.cc"],
    tags = [
        "no-oss-fuzz",
    ],
)
