From b64058e19ea605f200c87aece6337bd9eadba170 Mon Sep 17 00:00:00 2001 From: DavidKorczynski Date: Wed, 14 Apr 2021 19:05:54 +0100 Subject: [PATCH] use further optimisations on envoy fuzzers. (#5615) --- projects/envoy/build.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/projects/envoy/build.sh b/projects/envoy/build.sh index bee5b6bb3..6c188fc4e 100755 --- a/projects/envoy/build.sh +++ b/projects/envoy/build.sh @@ -62,6 +62,14 @@ export FUZZING_CXXFLAGS="$CXXFLAGS" declare -r DI="$( if [ "$SANITIZER" != "coverage" ] then +# Envoy code. Disable coverage instrumentation + echo " --per_file_copt=^.*source/extensions/access_loggers/.*\.cc\$@-fsanitize-coverage=0" + echo " --per_file_copt=^.*source/common/protobuf/.*\.cc\$@-fsanitize-coverage=0" + +# Envoy test code. Disable coverage instrumentation + echo " --per_file_copt=^.*test/.*\.cc\$@-fsanitize-coverage=0" + +# External dependencies. Disable all instrumentation. echo " --per_file_copt=^.*antlr4_runtimes.*\.cpp\$@-fsanitize-coverage=0,-fno-sanitize=all" echo " --per_file_copt=^.*com_google_protobuf.*\.cc\$@-fsanitize-coverage=0,-fno-sanitize=all" echo " --per_file_copt=^.*com_google_absl.*\.cc\$@-fsanitize-coverage=0,-fno-sanitize=all" @@ -77,6 +85,8 @@ then echo " --per_file_copt=^.*com_github_google_libprotobuf_mutator/.*\.cc\$@-fsanitize-coverage=0,-fno-sanitize=all" echo " --per_file_copt=^.*com_googlesource_googleurl/.*\.cc\$@-fsanitize-coverage=0,-fno-sanitize=all" echo " --per_file_copt=^.*com_lightstep_tracer_cpp/.*\.cc\$@-fsanitize-coverage=0,-fno-sanitize=all" + +# All protobuf code and code in bazel-out echo " --per_file_copt=^.*\.pb\.cc\$@-fsanitize-coverage=0,-fno-sanitize=all" echo " --per_file_copt=^.*bazel-out/.*\.cc\$@-fsanitize-coverage=0,-fno-sanitize=all" fi