summaryrefslogtreecommitdiff
path: root/test/Instrumentation
diff options
context:
space:
mode:
authorMatt Morehouse <mascasa@google.com>2017-09-20 22:53:08 +0000
committerMatt Morehouse <mascasa@google.com>2017-09-20 22:53:08 +0000
commitb01b302b3bc37c48bc0069cc13ec517c4ca0ea84 (patch)
tree0445df14d7a3b6ac8e16d0902f8c3756eb9597c1 /test/Instrumentation
parentaaf01f33c0955a93a85ed5eacc55cbc065a0adbc (diff)
[MSan] Disable sanitization for __sanitizer_dtor_callback.
Summary: Eliminate unnecessary instrumentation at __sanitizer_dtor_callback call sites. Fixes https://github.com/google/sanitizers/issues/861. Reviewers: eugenis, kcc Reviewed By: eugenis Subscribers: vitalybuka, llvm-commits, cfe-commits, hiraditya Differential Revision: https://reviews.llvm.org/D38063 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313831 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation')
-rw-r--r--test/Instrumentation/MemorySanitizer/call-nosanitize.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Instrumentation/MemorySanitizer/call-nosanitize.ll b/test/Instrumentation/MemorySanitizer/call-nosanitize.ll
new file mode 100644
index 00000000000..b5e6937f9f8
--- /dev/null
+++ b/test/Instrumentation/MemorySanitizer/call-nosanitize.ll
@@ -0,0 +1,16 @@
+; Verify that calls with !nosanitize are not instrumented by MSan.
+; RUN: opt < %s -msan -S | FileCheck %s
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+declare void @bar(i32 %x)
+
+define void @foo() {
+ call void @bar(i32 7), !nosanitize !{}
+ ret void
+}
+
+; CHECK-LABEL: define void @foo
+; CHECK-NOT: store i{{[0-9]+}} 0, {{.*}} @__msan_param_tls
+; CHECK: call void @bar
+; CHECK: ret void