[clang] eaae6fd - [clang] [MinGW] Allow using the vptr sanitizer
Martin Storsjö via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 2 23:59:33 PST 2020
Author: Martin Storsjö
Date: 2020-11-03T09:59:09+02:00
New Revision: eaae6fdf67e1f61599331d69a41a7dafe6199667
URL: https://github.com/llvm/llvm-project/commit/eaae6fdf67e1f61599331d69a41a7dafe6199667
DIFF: https://github.com/llvm/llvm-project/commit/eaae6fdf67e1f61599331d69a41a7dafe6199667.diff
LOG: [clang] [MinGW] Allow using the vptr sanitizer
Differential Revision: https://reviews.llvm.org/D90572
Added:
Modified:
clang/lib/Driver/ToolChains/MinGW.cpp
clang/test/Driver/mingw-sanitizers.c
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/MinGW.cpp b/clang/lib/Driver/ToolChains/MinGW.cpp
index 49fef4298bfe..f6cead412236 100644
--- a/clang/lib/Driver/ToolChains/MinGW.cpp
+++ b/clang/lib/Driver/ToolChains/MinGW.cpp
@@ -491,6 +491,7 @@ SanitizerMask toolchains::MinGW::getSupportedSanitizers() const {
Res |= SanitizerKind::Address;
Res |= SanitizerKind::PointerCompare;
Res |= SanitizerKind::PointerSubtract;
+ Res |= SanitizerKind::Vptr;
return Res;
}
diff --git a/clang/test/Driver/mingw-sanitizers.c b/clang/test/Driver/mingw-sanitizers.c
index 09f28fea8abf..701e9107f485 100644
--- a/clang/test/Driver/mingw-sanitizers.c
+++ b/clang/test/Driver/mingw-sanitizers.c
@@ -9,3 +9,5 @@
// ASAN-X86_64: "{{[^"]*}}libclang_rt.asan_dynamic_runtime_thunk-x86_64.a"
// ASAN-X86_64: "--require-defined" "__asan_seh_interceptor"
// ASAN-X86_64: "--whole-archive" "{{.*}}libclang_rt.asan_dynamic_runtime_thunk-x86_64.a" "--no-whole-archive"
+
+// RUN: %clang -target x86_64-windows-gnu %s -### -fsanitize=vptr
More information about the cfe-commits
mailing list