Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: build/config/sanitizers/sanitizers.gni

Issue 2920963002: GN: Add an explicit gn arg for recovery in CFI (Closed)
Patch Set: typo Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/sanitizers/BUILD.gn ('k') | tools/mb/mb_config.pyl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/sanitizers/sanitizers.gni
diff --git a/build/config/sanitizers/sanitizers.gni b/build/config/sanitizers/sanitizers.gni
index 17f4d9633f0e141f84c0dfe130de02982e79dead..f6cdef3f19d00f8f754e6ef2f7c334a86e469542 100644
--- a/build/config/sanitizers/sanitizers.gni
+++ b/build/config/sanitizers/sanitizers.gni
@@ -67,10 +67,13 @@ declare_args() {
# https://crbug.com/701919
use_cfi_icall = false
- # By default, Control Flow Integrity will crash the program if it detects a
- # violation. Set this to true to print detailed diagnostics instead.
+ # Print detailed diagnostics when Control Flow Integrity detects a violation.
use_cfi_diag = false
+ # Let Control Flow Integrity continue execution instead of crashing when
+ # printing diagnostics (use_cfi_diag = true).
+ use_cfi_recover = false
+
# Compile for fuzzing with LLVM LibFuzzer.
# See http://www.chromium.org/developers/testing/libfuzzer
use_libfuzzer = false
@@ -122,6 +125,7 @@ if (current_toolchain != default_toolchain) {
sanitizer_coverage_flags = ""
use_afl = false
use_cfi_diag = false
+ use_cfi_recover = false
use_custom_libcxx = false
use_drfuzz = false
use_libfuzzer = false
@@ -201,3 +205,8 @@ assert(!is_msan || (is_linux && current_cpu == "x64"),
# allocation functions is hard on Windows and not yet implemented in LLVM.
assert(!is_win || !is_debug || !is_asan,
"ASan on Windows doesn't work in debug (set is_debug=false).")
+
+# Make sure that if we recover on detection (i.e. not crash), diagnostics are
+# printed.
+assert(!use_cfi_recover || use_cfi_diag,
+ "Only use CFI recovery together with diagnostics.")
« no previous file with comments | « build/config/sanitizers/BUILD.gn ('k') | tools/mb/mb_config.pyl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698