Allow integer_overflow sanitizer path exclusion.

Add support for excluding paths from having integer_overflow applied to
them when using SANITIZE_TARGET=integer_overflow via an
INTEGER_OVERFLOW_EXCLUDE_PATHS make variable. This covers the soong side
of the change.

Bug: 30969751
Test: Build with SANITIZE_TARGET=integer_overflow
SANITIZE_TARGET_DIAG=integer_overflow
INTEGER_OVERFLOW_EXCLUDE_PATHS=<path> and confirmed this was no
longer being applied to binaries in that path.

Change-Id: I298b772f5425da28dff1cf007825be19558db3a8
This commit is contained in:
Ivan Lozano
2017-07-13 14:46:05 -07:00
parent da4a7257b5
commit 5f59553bca
4 changed files with 25 additions and 11 deletions

View File

@@ -188,7 +188,9 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
}
if found, globalSanitizers = removeFromList("integer_overflow", globalSanitizers); found && s.Integer_overflow == nil {
s.Integer_overflow = boolPtr(true)
if !ctx.AConfig().IntegerOverflowDisabledForPath(ctx.ModuleDir()) {
s.Integer_overflow = boolPtr(true)
}
}
if len(globalSanitizers) > 0 {