summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraizatsky <aizatsky@chromium.org>2016-03-25 15:14:33 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-25 22:16:17 +0000
commit277738b70c694a1017dfce3305badf4c319bed30 (patch)
tree85c0621b61877c72032c285a6a0621e40f027244
parent38ac6be27a783853f6a8fec136d2f4d3235a34d6 (diff)
downloadchromium_src-277738b70c694a1017dfce3305badf4c319bed30.zip
chromium_src-277738b70c694a1017dfce3305badf4c319bed30.tar.gz
chromium_src-277738b70c694a1017dfce3305badf4c319bed30.tar.bz2
[libfuzzer] separate libfuzzer ubsan configuration and ubsan build config setup.
BUG=596650 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/1832213002 Cr-Commit-Position: refs/heads/master@{#383382}
-rw-r--r--build/config/sanitizers/BUILD.gn8
-rw-r--r--build/config/sanitizers/sanitizers.gni4
-rw-r--r--tools/mb/mb_config.pyl7
3 files changed, 19 insertions, 0 deletions
diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn
index 0b74d8c..48a8d45 100644
--- a/build/config/sanitizers/BUILD.gn
+++ b/build/config/sanitizers/BUILD.gn
@@ -246,6 +246,14 @@ config("default_sanitizer_flags") {
"-fsanitize-blacklist=$ubsan_vptr_blacklist_path",
]
}
+ if (is_ubsan_security) {
+ ubsan_blacklist_path =
+ rebase_path("//tools/ubsan/blacklist.txt", root_build_dir)
+ cflags += [
+ "-fsanitize=signed-integer-overflow",
+ "-fsanitize-blacklist=$ubsan_blacklist_path",
+ ]
+ }
if (is_lto && !is_nacl) {
cflags += [ "-flto" ]
diff --git a/build/config/sanitizers/sanitizers.gni b/build/config/sanitizers/sanitizers.gni
index 0323807..c467db2 100644
--- a/build/config/sanitizers/sanitizers.gni
+++ b/build/config/sanitizers/sanitizers.gni
@@ -49,6 +49,10 @@ declare_args() {
# See http://www.chromium.org/developers/testing/libfuzzer
use_libfuzzer = false
+ # Enables core ubsan security features. Will later be removed once it matches
+ # is_ubsan.
+ is_ubsan_security = false
+
# Compile for fuzzing with Dr. Fuzz
# See http://www.chromium.org/developers/testing/dr-fuzz
use_drfuzz = false
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl
index 31f1c76..b911895 100644
--- a/tools/mb/mb_config.pyl
+++ b/tools/mb/mb_config.pyl
@@ -204,6 +204,7 @@
'CrWinClang64(dbg)': 'win_clang_debug_bot',
'Libfuzzer Upload Linux ASan': 'gn_release_libfuzzer_asan',
'Libfuzzer Upload Linux MSan': 'gn_release_libfuzzer_msan',
+ 'Libfuzzer Upload Linux UBSan': 'gn_release_libfuzzer_ubsan',
'Linux ARM': 'swarming_gyp_release_bot_arm',
'Site Isolation Linux': 'gn_release_trybot',
'Site Isolation Win': 'gyp_release_trybot_x64',
@@ -1123,6 +1124,10 @@
'gn_release_libfuzzer_msan': [
'gn', 'release', 'libfuzzer', 'msan', 'proprietary_codecs', 'pdf_xfa',
],
+ 'gn_release_libfuzzer_ubsan': [
+ 'gn', 'release', 'libfuzzer', 'ubsan_security', 'proprietary_codecs',
+ 'pdf_xfa',
+ ],
'gn_release_drmemory_drfuzz_x86': [
'gn', 'release', 'drmemory', 'drfuzz', 'x86', 'proprietary_codecs',
@@ -1625,6 +1630,8 @@
'libfuzzer': { 'gn_args': 'use_libfuzzer=true' },
+ 'ubsan_security': { 'gn_args': 'is_ubsan_security=true' },
+
'lsan': {
'gn_args': 'is_lsan=true',
'gyp_defines': 'lsan=1',