From b15a564869dada75d78f72489fc50138cd314764 Mon Sep 17 00:00:00 2001 From: Evgenii Stepanov Date: Wed, 23 Jun 2021 12:30:55 -0700 Subject: [PATCH] Disable ubsan diagnostics under HWASan. This is a workaround for a compiler bug that makes this combination extremely slow to build. Bug: 191808836 Test: m net_test_btm_iso with SANITIZE_TARGET=hwaddress Change-Id: Ide7436bbc564413cb2f29355ada5286976607205 --- cc/sanitize.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cc/sanitize.go b/cc/sanitize.go index 513730ae9..b0eb0c6ab 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -485,6 +485,11 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) { if Bool(s.Hwaddress) { s.Address = nil s.Thread = nil + // Disable ubsan diagnosic as a workaround for a compiler bug. + // TODO(b/191808836): re-enable. + s.Diag.Undefined = nil + s.Diag.Integer_overflow = nil + s.Diag.Misc_undefined = nil } // TODO(b/131771163): CFI transiently depends on LTO, and thus Fuzzer is