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

Side by Side Diff: build/config/sanitizers/sanitizers.gni

Issue 2920963002: GN: Add an explicit gn arg for recovery in CFI (Closed)
Patch Set: updates 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 unified diff | Download patch
« no previous file with comments | « build/config/sanitizers/BUILD.gn ('k') | tools/mb/mb_config.pyl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/toolchain/toolchain.gni") 6 import("//build/toolchain/toolchain.gni")
7 7
8 declare_args() { 8 declare_args() {
9 # Compile for Address Sanitizer to find memory bugs. 9 # Compile for Address Sanitizer to find memory bugs.
10 is_asan = false 10 is_asan = false
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 # Enable checks for bad casts: derived cast and unrelated cast. 60 # Enable checks for bad casts: derived cast and unrelated cast.
61 # TODO(krasin): remove this, when we're ready to add these checks by default. 61 # TODO(krasin): remove this, when we're ready to add these checks by default.
62 # https://crbug.com/626794 62 # https://crbug.com/626794
63 use_cfi_cast = false 63 use_cfi_cast = false
64 64
65 # Enable checks for indirect function calls via a function pointer. 65 # Enable checks for indirect function calls via a function pointer.
66 # TODO(pcc): remove this when we're ready to add these checks by default. 66 # TODO(pcc): remove this when we're ready to add these checks by default.
67 # https://crbug.com/701919 67 # https://crbug.com/701919
68 use_cfi_icall = false 68 use_cfi_icall = false
69 69
70 # By default, Control Flow Integrity will crash the program if it detects a 70 # Print detailed diagnostics when Control Flow Integrity detects a violation.
71 # violation. Set this to true to print detailed diagnostics instead.
72 use_cfi_diag = false 71 use_cfi_diag = false
73 72
73 # Let Control Flow Integrity continue execution instead of crashing when
74 # printing diagnostics (use_cfi_diag = true).
75 use_cfi_recover = false
Dirk Pranke 2017/06/07 19:42:12 Should we have an assert somewhere that `!use_cfi_
Michael Achenbach 2017/06/07 20:59:32 Can add that tomorrow...
Michael Achenbach 2017/06/08 10:58:38 Done in patch 3. Added it at the end of this file
76
74 # Compile for fuzzing with LLVM LibFuzzer. 77 # Compile for fuzzing with LLVM LibFuzzer.
75 # See http://www.chromium.org/developers/testing/libfuzzer 78 # See http://www.chromium.org/developers/testing/libfuzzer
76 use_libfuzzer = false 79 use_libfuzzer = false
77 80
78 # Compile for fuzzing with AFL. 81 # Compile for fuzzing with AFL.
79 use_afl = false 82 use_afl = false
80 83
81 # Enables core ubsan security features. Will later be removed once it matches 84 # Enables core ubsan security features. Will later be removed once it matches
82 # is_ubsan. 85 # is_ubsan.
83 is_ubsan_security = false 86 is_ubsan_security = false
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 is_tsan = false 118 is_tsan = false
116 is_ubsan = false 119 is_ubsan = false
117 is_ubsan_null = false 120 is_ubsan_null = false
118 is_ubsan_no_recover = false 121 is_ubsan_no_recover = false
119 is_ubsan_security = false 122 is_ubsan_security = false
120 is_ubsan_vptr = false 123 is_ubsan_vptr = false
121 msan_track_origins = 0 124 msan_track_origins = 0
122 sanitizer_coverage_flags = "" 125 sanitizer_coverage_flags = ""
123 use_afl = false 126 use_afl = false
124 use_cfi_diag = false 127 use_cfi_diag = false
128 use_cfi_recover = false
125 use_custom_libcxx = false 129 use_custom_libcxx = false
126 use_drfuzz = false 130 use_drfuzz = false
127 use_libfuzzer = false 131 use_libfuzzer = false
128 use_prebuilt_instrumented_libraries = false 132 use_prebuilt_instrumented_libraries = false
129 use_locally_built_instrumented_libraries = false 133 use_locally_built_instrumented_libraries = false
130 use_sanitizer_coverage = false 134 use_sanitizer_coverage = false
131 } 135 }
132 136
133 # Args that are in turn dependent on other args must be in a separate 137 # Args that are in turn dependent on other args must be in a separate
134 # declare_args block. User overrides are only applied at the end of a 138 # declare_args block. User overrides are only applied at the end of a
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 assert(!is_debug || !(is_msan || is_ubsan || is_ubsan_null || is_ubsan_vptr), 198 assert(!is_debug || !(is_msan || is_ubsan || is_ubsan_null || is_ubsan_vptr),
195 "Sanitizers should generally be used in release (set is_debug=false).") 199 "Sanitizers should generally be used in release (set is_debug=false).")
196 200
197 assert(!is_msan || (is_linux && current_cpu == "x64"), 201 assert(!is_msan || (is_linux && current_cpu == "x64"),
198 "MSan currently only works on 64-bit Linux and ChromeOS builds.") 202 "MSan currently only works on 64-bit Linux and ChromeOS builds.")
199 203
200 # ASAN build on Windows is not working in debug mode. Intercepting memory 204 # ASAN build on Windows is not working in debug mode. Intercepting memory
201 # allocation functions is hard on Windows and not yet implemented in LLVM. 205 # allocation functions is hard on Windows and not yet implemented in LLVM.
202 assert(!is_win || !is_debug || !is_asan, 206 assert(!is_win || !is_debug || !is_asan,
203 "ASan on Windows doesn't work in debug (set is_debug=false).") 207 "ASan on Windows doesn't work in debug (set is_debug=false).")
OLDNEW
« 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