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

Unified Diff: build/common.gypi

Issue 640853007: Add rudimentary support for ASan's intra-object-overflow detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: blacklist Created 6 years, 2 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 | « no previous file | tools/memory/asan/blacklist.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index e9b1476c5899373fda5da635d0bcc5b73f9aa141..129cc615629625c65086613376a827e27f6eb892 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -382,10 +382,13 @@
# -fsanitize=address only works with clang, but asan=1 implies clang=1
# See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
'asan%': 0,
+ 'asan_blacklist%': '<(PRODUCT_DIR)/../../tools/memory/asan/blacklist.txt',
# Enable coverage gathering instrumentation in ASan. This flag also
# controls coverage granularity (1 for function-level coverage, 2 for
# block-level coverage).
'asan_coverage%': 0,
+ # Enable intra-object-overflow detection in ASan (experimental).
+ 'asan_field_padding%': 0,
# Enable Chromium overrides of the default configurations for various
# dynamic tools (like ASan).
@@ -1105,7 +1108,9 @@
'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
'mac_want_real_dsym%': '<(mac_want_real_dsym)',
'asan%': '<(asan)',
+ 'asan_blacklist%': '<(asan_blacklist)',
'asan_coverage%': '<(asan_coverage)',
+ 'asan_field_padding%': '<(asan_field_padding)',
'use_sanitizer_options%': '<(use_sanitizer_options)',
'syzyasan%': '<(syzyasan)',
'syzygy_optimize%': '<(syzygy_optimize)',
@@ -4054,6 +4059,7 @@
['_toolset=="target"', {
'cflags': [
'-fsanitize=address',
+ '-fsanitize-blacklist=<(asan_blacklist)',
],
'ldflags': [
'-fsanitize=address',
@@ -4115,6 +4121,15 @@
}],
],
}],
+ ['asan_field_padding!=0', {
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'cflags': [
+ '-fsanitize-address-field-padding=<(asan_field_padding)',
+ ],
+ }],
+ ],
+ }],
['lsan==1', {
'target_conditions': [
['_toolset=="target"', {
« no previous file with comments | « no previous file | tools/memory/asan/blacklist.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698