Include/exclude lists for memtag_heap sanitizer.

Bug: b/135772972
Test: cc_test.go / TestSanitizeMemtagHeap
Change-Id: I263b23647f1874ae3024101dce1b07091c1c9403
This commit is contained in:
Evgenii Stepanov
2021-01-05 16:41:26 -08:00
parent 193ac2eb96
commit 4beaa0c964
4 changed files with 78 additions and 5 deletions

View File

@@ -1256,6 +1256,27 @@ func (c *config) CFIEnabledForPath(path string) bool {
return HasAnyPrefix(path, c.productVariables.CFIIncludePaths)
}
func (c *config) MemtagHeapDisabledForPath(path string) bool {
if len(c.productVariables.MemtagHeapExcludePaths) == 0 {
return false
}
return HasAnyPrefix(path, c.productVariables.MemtagHeapExcludePaths)
}
func (c *config) MemtagHeapAsyncEnabledForPath(path string) bool {
if len(c.productVariables.MemtagHeapAsyncIncludePaths) == 0 {
return false
}
return HasAnyPrefix(path, c.productVariables.MemtagHeapAsyncIncludePaths)
}
func (c *config) MemtagHeapSyncEnabledForPath(path string) bool {
if len(c.productVariables.MemtagHeapSyncIncludePaths) == 0 {
return false
}
return HasAnyPrefix(path, c.productVariables.MemtagHeapSyncIncludePaths)
}
func (c *config) VendorConfig(name string) VendorConfig {
return soongconfig.Config(c.productVariables.VendorVars[name])
}