Commit cca780d5 authored by Jonathan Metzman's avatar Jonathan Metzman Committed by Commit Bot

Don't sanitize libFuzzer or afl_driver unless using MSAN

This should slightly improve performance and provide other benefits.

Bug: 883948, 905708
Change-Id: I7b00ca2b398115c9a5eb5dca47dda70be2df6cc1
Reviewed-on: https://chromium-review.googlesource.com/c/1338174Reviewed-by: default avatarMax Moroz <mmoroz@chromium.org>
Commit-Queue: Jonathan Metzman <metzman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608450}
parent 2677c38d
...@@ -2,14 +2,20 @@ ...@@ -2,14 +2,20 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("///build/config/sanitizers/sanitizers.gni")
# Engine should be compiled without coverage (infinite loop in trace_cmp). # Engine should be compiled without coverage (infinite loop in trace_cmp).
fuzzing_engine_remove_configs = [ fuzzing_engine_remove_configs = [
"//build/config/coverage:default_coverage", "//build/config/coverage:default_coverage",
"//build/config/sanitizers:default_sanitizer_flags", "//build/config/sanitizers:default_sanitizer_flags",
] ]
fuzzing_engine_add_configs = fuzzing_engine_add_configs = []
[ "//build/config/sanitizers:default_sanitizer_flags_but_coverage" ]
if (is_msan) {
fuzzing_engine_add_configs +=
[ "//build/config/sanitizers:default_sanitizer_flags_but_coverage" ]
}
source_set("libfuzzer") { source_set("libfuzzer") {
sources = [ sources = [
...@@ -41,11 +47,7 @@ source_set("libfuzzer") { ...@@ -41,11 +47,7 @@ source_set("libfuzzer") {
] ]
configs -= fuzzing_engine_remove_configs configs -= fuzzing_engine_remove_configs
if (!is_win) { configs += fuzzing_engine_add_configs
# TODO(crbug.com/883948): Remove the check for is_win when libFuzzer on
# Windows handles the nosanitize attribute properly.
configs += fuzzing_engine_add_configs
}
} }
source_set("afl_driver") { source_set("afl_driver") {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment