From da069087bf9e154dcb68526252ce94542a23d8c6 Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Thu, 22 Aug 2019 00:46:36 +0000 Subject: [PATCH] Revert "Re-enable ASAN globals instrumentation for devices." This reverts commit cba311bcfc698c09841e289537e077905ef9ff44. The build is actually still broken with ASAN globals instrumentation. We accidentally suppressed ASAN by turning on the new pass manager and the build breakage was not discovered. Bug: 137312732 Bug: 139747256 Change-Id: I8110e1413468c4d760a59a8de816a72c9852a7c8 --- cc/sanitize.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cc/sanitize.go b/cc/sanitize.go index c59f53a04..0eb9a7425 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -445,6 +445,7 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags { // libraries needed with -fsanitize=address. http://b/18650275 (WAI) flags.LdFlags = append(flags.LdFlags, "-Wl,--no-as-needed") } else { + flags.CFlags = append(flags.CFlags, "-mllvm", "-asan-globals=0") if ctx.bootstrap() { flags.DynamicLinker = "/system/bin/bootstrap/linker_asan" } else {