diff --git a/cc/sanitize.go b/cc/sanitize.go index 18d6c16e1..7d7bd0903 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -186,6 +186,12 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) { s.Diag.Cfi = nil } + // Also disable CFI if ASAN is enabled. + if Bool(s.Address) { + s.Cfi = nil + s.Diag.Cfi = nil + } + if ctx.staticBinary() { s.Address = nil s.Coverage = nil