[asan] Remove -fsanitize-address-zero-base-shadow command line
flag from clang, and disable zero-base shadow support on all platforms
where it is not the default behavior.
- It is completely unused, as far as we know.
- It is ABI-incompatible with non-zero-base shadow, which means all
objects in a process must be built with the same setting. Failing to
do so results in a segmentation fault at runtime.
- It introduces a backward dependency of compiler-rt on user code,
which is uncommon and complicates testing.
This is the Clang part of a larger change.
llvm-svn: 199372
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 23d1edf..d6d4f47 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -180,12 +180,10 @@
LangOpts.Sanitize.InitOrder,
LangOpts.Sanitize.UseAfterReturn,
LangOpts.Sanitize.UseAfterScope,
- CGOpts.SanitizerBlacklistFile,
- CGOpts.SanitizeAddressZeroBaseShadow));
+ CGOpts.SanitizerBlacklistFile));
PM.add(createAddressSanitizerModulePass(
LangOpts.Sanitize.InitOrder,
- CGOpts.SanitizerBlacklistFile,
- CGOpts.SanitizeAddressZeroBaseShadow));
+ CGOpts.SanitizerBlacklistFile));
}
static void addMemorySanitizerPass(const PassManagerBuilder &Builder,