Index: build/config/sanitizers/sanitizers.gni |
diff --git a/build/config/sanitizers/sanitizers.gni b/build/config/sanitizers/sanitizers.gni |
index 32cecffcae1e3ecf9ba178625a873add8a96833a..cf61ba8a91be77013fb24390cfa94a05bd07cf89 100644 |
--- a/build/config/sanitizers/sanitizers.gni |
+++ b/build/config/sanitizers/sanitizers.gni |
@@ -78,7 +78,6 @@ declare_args() { |
# trace-pc |
# Default value when unset and use_sanitizer_coverage=true: |
# edge,indirect-calls,8bit-counters |
- |
sanitizer_coverage_flags = "" |
} |
@@ -96,6 +95,16 @@ declare_args() { |
# Enable -fsanitize-coverage. |
use_sanitizer_coverage = |
use_libfuzzer || use_afl || sanitizer_coverage_flags != "" |
+ |
+ # Detect overflow/underflow for global objects. |
+ # |
+ # Android build relies on -Wl,--gc-sections removing unreachable code. |
+ # ASan instrumentation for globals inhibits this and results in a |
+ # library with unresolvable relocations. |
+ # TODO(eugenis): find a way to reenable this. |
+ # |
+ # Mac: http://crbug.com/352073 |
+ asan_globals = !is_android && !is_mac |
} |
if (use_afl && sanitizer_coverage_flags == "") { |