summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGuanzhong Chen <gzchen@google.com>2019-06-26 20:16:14 +0000
committerGuanzhong Chen <gzchen@google.com>2019-06-26 20:16:14 +0000
commita057056821e096990964f3416835c8477eb1b6bf (patch)
tree8b1eed22d4dbfc259a97ff516a396b4959fde2f2 /lib
parent0ad57c86b23bd29ec94af2ba29d5ff57582f3076 (diff)
downloadclang-a057056821e096990964f3416835c8477eb1b6bf.tar.gz
[WebAssembly] Implement Address Sanitizer for Emscripten
Summary: This diff enables address sanitizer on Emscripten. On Emscripten, real memory starts at the value passed to --global-base. All memory before this is used as shadow memory, and thus the shadow mapping function is simply dividing by 8. Reviewers: tlively, aheejin, sbc100 Reviewed By: sbc100 Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D63742 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@364468 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Driver/ToolChains/WebAssembly.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains/WebAssembly.cpp b/lib/Driver/ToolChains/WebAssembly.cpp
index a6a881873e..648e5b3a94 100644
--- a/lib/Driver/ToolChains/WebAssembly.cpp
+++ b/lib/Driver/ToolChains/WebAssembly.cpp
@@ -238,7 +238,7 @@ void WebAssembly::AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
SanitizerMask WebAssembly::getSupportedSanitizers() const {
SanitizerMask Res = ToolChain::getSupportedSanitizers();
if (getTriple().isOSEmscripten()) {
- Res |= SanitizerKind::Vptr | SanitizerKind::Leak;
+ Res |= SanitizerKind::Vptr | SanitizerKind::Leak | SanitizerKind::Address;
}
return Res;
}