aboutsummaryrefslogtreecommitdiff
path: root/test/tsan/Linux/check_memcpy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/tsan/Linux/check_memcpy.cc')
-rw-r--r--test/tsan/Linux/check_memcpy.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/tsan/Linux/check_memcpy.cc b/test/tsan/Linux/check_memcpy.cc
new file mode 100644
index 000000000000..8ad04c07cf51
--- /dev/null
+++ b/test/tsan/Linux/check_memcpy.cc
@@ -0,0 +1,15 @@
+// Test that verifies TSan runtime doesn't contain compiler-emitted
+// memcpy/memmove calls. It builds the binary with TSan and passes it to
+// check_memcpy.sh script.
+
+// RUN: %clangxx_tsan -O1 %s -o %t
+// RUN: llvm-objdump -d %t | FileCheck %s
+
+int main() {
+ return 0;
+}
+
+// CHECK-NOT: callq {{.*<(__interceptor_)?mem(cpy|set)>}}
+// tail calls:
+// CHECK-NOT: jmpq {{.*<(__interceptor_)?mem(cpy|set)>}}
+