Chromium Code Reviews| Index: build/config/sanitizers/sanitizers.gni |
| diff --git a/build/config/sanitizers/sanitizers.gni b/build/config/sanitizers/sanitizers.gni |
| index 84348da425ae90a53e5f74edbf7709f51fd1cd50..7a90d175d02a0dbec75ff3f9d89b8b4697a9c5e9 100644 |
| --- a/build/config/sanitizers/sanitizers.gni |
| +++ b/build/config/sanitizers/sanitizers.gni |
| @@ -16,13 +16,17 @@ declare_args() { |
| is_tsan = false |
| # Compile for Undefined Behaviour Sanitizer to find various types of |
| - # undefined behaviour. |
| + # undefined behaviour (excludes vptr checks). |
| is_ubsan = false |
| + # Compile for Undefined Behaviour Sanitizer's vptr checks. |
| + is_ubsan_vptr = false |
| + |
| # Use libc++ (buildtools/third_party/libc++ and |
| # buildtools/third_party/libc++abi) instead of stdlibc++ as standard library. |
| # This is intended to be used for instrumented builds. |
| - use_custom_libcxx = (is_asan && is_linux) || is_tsan || is_msan || is_ubsan |
| + use_custom_libcxx = |
| + (is_asan && is_linux) || is_tsan || is_msan || is_ubsan || is_ubsan_vptr |
| # Track where uninitialized memory originates from. From fastest to slowest: |
| # 0 - no tracking, 1 - track only the initial allocation site, 2 - track the |
| @@ -49,7 +53,8 @@ declare_args() { |
| } |
| # TODO(GYP) bug 527515: is_ubsan, is_ubsan_vptr |
|
brettw
2015/10/09 20:14:28
Can you remove this TODO?
Anand Mistry (off Chromium)
2015/10/12 04:28:56
Done.
|
| -using_sanitizer = is_asan || is_lsan || is_tsan || is_msan || is_ubsan |
| +using_sanitizer = |
| + is_asan || is_lsan || is_tsan || is_msan || is_ubsan || is_ubsan_vptr |
| assert(!using_sanitizer || is_clang, |
| "Sanitizers (is_*san) require setting is_clang = true in 'gn args'") |
| @@ -67,5 +72,6 @@ assert(!using_sanitizer || is_clang, |
| # unsupported or unadvisable configurations. |
| # |
| # For one-off testing, just comment this assertion out. |
| -assert(!is_debug || !(is_msan || is_lsan || is_tsan || is_ubsan), |
| - "Sanitizers should generally be used in release (set is_debug=false).") |
| +assert( |
| + !is_debug || !(is_msan || is_lsan || is_tsan || is_ubsan || is_ubsan_vptr), |
| + "Sanitizers should generally be used in release (set is_debug=false).") |