Fix data race on cfiExportsMap
cfiExportsMap was reinitialized for every module, which caused data races. Create the path from the string on each use instead. Bug: 77234104 Test: m nothing with race detector turned on Change-Id: Ibca3149dcbe8a9d4d9f7ec6dd0b164697e7ae5cd
This commit is contained in:
@@ -39,7 +39,6 @@ var (
|
||||
cfiLdflags = []string{"-flto", "-fsanitize-cfi-cross-dso", "-fsanitize=cfi",
|
||||
"-Wl,-plugin-opt,O1"}
|
||||
cfiExportsMapPath = "build/soong/cc/config/cfi_exports.map"
|
||||
cfiExportsMap android.Path
|
||||
cfiStaticLibsMutex sync.Mutex
|
||||
|
||||
intOverflowCflags = []string{"-fsanitize-blacklist=build/soong/cc/config/integer_overflow_blacklist.txt"}
|
||||
@@ -284,8 +283,6 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
|
||||
ctx.ModuleErrorf(`Use of "coverage" also requires "address"`)
|
||||
}
|
||||
}
|
||||
|
||||
cfiExportsMap = android.PathForSource(ctx, cfiExportsMapPath)
|
||||
}
|
||||
|
||||
func (sanitize *sanitize) deps(ctx BaseModuleContext, deps Deps) Deps {
|
||||
|
Reference in New Issue
Block a user