diff options
author | Ivan Lozano <ivanlozano@google.com> | 2017-06-28 09:10:48 -0700 |
---|---|---|
committer | Ivan Lozano <ivanlozano@google.com> | 2017-07-07 09:52:23 -0700 |
commit | 0c3a1efae4814f62ece007c7fc2251386aaae2f2 (patch) | |
tree | ac4227abed121ec081b0e30137c857ec97fd73e4 /android | |
parent | e9425b0277ea05db66d986f5530bf53e09bd37ac (diff) | |
download | build_soong-0c3a1efae4814f62ece007c7fc2251386aaae2f2.tar.gz build_soong-0c3a1efae4814f62ece007c7fc2251386aaae2f2.tar.bz2 build_soong-0c3a1efae4814f62ece007c7fc2251386aaae2f2.zip |
Add integer_overflow sanitization build option.
Adds the SANITIZE_TARGET=integer_overflow build option to apply signed and
unsigned integer overflow sanitization globally. This implements the
Soong side of the build option.
An additional build option is provided to control whether or not to run
in diagnostics mode, controlled by SANITIZE_TARGET_DIAG. This works the
same way that SANITIZE_TARGET does and currently only supports
'integer_overflow' as an option.
A default sanitizer blacklist is added to avoid applying sanitization
to functions that are likely to exhibit benign overflows.
Bug: 30969751
Test: Building with and without the new flags, device boot-up, tested
various permutations of controlling the new flags from build files.
Change-Id: Ibc8a8615d3132f1a23faaf1cb4861f24c5ef734a
Diffstat (limited to 'android')
-rw-r--r-- | android/config.go | 4 | ||||
-rw-r--r-- | android/variable.go | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/android/config.go b/android/config.go index dbb9fa41..1b060638 100644 --- a/android/config.go +++ b/android/config.go @@ -428,6 +428,10 @@ func (c *config) SanitizeDevice() []string { return append([]string(nil), c.ProductVariables.SanitizeDevice...) } +func (c *config) SanitizeDeviceDiag() []string { + return append([]string(nil), c.ProductVariables.SanitizeDeviceDiag...) +} + func (c *config) SanitizeDeviceArch() []string { return append([]string(nil), c.ProductVariables.SanitizeDeviceArch...) } diff --git a/android/variable.go b/android/variable.go index 05f50b5e..1efab47e 100644 --- a/android/variable.go +++ b/android/variable.go @@ -154,6 +154,7 @@ type productVariables struct { SanitizeHost []string `json:",omitempty"` SanitizeDevice []string `json:",omitempty"` + SanitizeDeviceDiag []string `json:",omitempty"` SanitizeDeviceArch []string `json:",omitempty"` ArtUseReadBarrier *bool `json:",omitempty"` |