Index: build/config/sanitizers/BUILD.gn |
diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn |
index 7dd3dd2e62029fb06b28726329d0200ba498e3e8..979138865a2985d2c4e6d276ba20f027a4315775 100644 |
--- a/build/config/sanitizers/BUILD.gn |
+++ b/build/config/sanitizers/BUILD.gn |
@@ -127,6 +127,9 @@ config("default_sanitizer_ldflags") { |
if (is_ubsan || is_ubsan_security) { |
ldflags += [ "-fsanitize=undefined" ] |
Nico
2016/06/02 21:06:09
but is having to set a toggle really easier than j
|
} |
+ if (is_ubsan_null) { |
+ ldflags += [ "-fsanitize=null" ] |
+ } |
if (is_ubsan_vptr) { |
ldflags += [ "-fsanitize=vptr" ] |
} |
@@ -361,6 +364,12 @@ config("ubsan_security_flags") { |
} |
} |
+config("ubsan_null_flags") { |
+ if (is_ubsan_null) { |
+ cflags = [ "-fsanitize=null" ] |
+ } |
+} |
+ |
config("ubsan_vptr_flags") { |
if (is_ubsan_vptr) { |
ubsan_vptr_blacklist_path = |
@@ -383,6 +392,7 @@ all_sanitizer_configs = [ |
":tsan_flags", |
":ubsan_flags", |
":ubsan_no_recover", |
+ ":ubsan_null_flags", |
":ubsan_security_flags", |
":ubsan_vptr_flags", |
] |