Keep a "sanitizer dependency" flag for each sanitizer.

This is so that we can avoid mutating state in sanitizerMutator, as
would be necessary if we only had a single bit for every sanitizer
together.

Test: Presubmits.
Change-Id: I5576367c12972fbea64342ab123118ec5a2cfeec
This commit is contained in:
Lukacs T. Berki
2022-05-18 10:00:37 +02:00
parent 53c6c67cbb
commit 2da6c3cc86
3 changed files with 37 additions and 27 deletions

View File

@@ -22,16 +22,16 @@ type PlatformSanitizeable interface {
// than left undefined.
IsSanitizerExplicitlyDisabled(t SanitizerType) bool
// SanitizeDep returns the value of the SanitizeDep flag, which is set if a module is a dependency of a
// sanitized module.
SanitizeDep() bool
// SanitizeDep returns true if the module is statically linked into another that is sanitized
// with the given sanitizer.
SanitizeDep(t SanitizerType) bool
// SetSanitizeDep marks a module as a static dependency of another module to be sanitized.
SetSanitizeDep(t SanitizerType)
// SetSanitizer enables or disables the specified sanitizer type if it's supported, otherwise this should panic.
SetSanitizer(t SanitizerType, b bool)
// SetSanitizerDep returns true if the module is statically linked.
SetSanitizeDep(b bool)
// StaticallyLinked returns true if the module is statically linked.
StaticallyLinked() bool