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
diff --git a/android/variable.go b/android/variable.go
index 05f50b5..1efab47 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -154,6 +154,7 @@
SanitizeHost []string `json:",omitempty"`
SanitizeDevice []string `json:",omitempty"`
+ SanitizeDeviceDiag []string `json:",omitempty"`
SanitizeDeviceArch []string `json:",omitempty"`
ArtUseReadBarrier *bool `json:",omitempty"`