aboutsummaryrefslogtreecommitdiff
path: root/lib/asan/lit_tests/SharedLibs/shared-lib-test-so.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asan/lit_tests/SharedLibs/shared-lib-test-so.cc')
-rw-r--r--lib/asan/lit_tests/SharedLibs/shared-lib-test-so.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/asan/lit_tests/SharedLibs/shared-lib-test-so.cc b/lib/asan/lit_tests/SharedLibs/shared-lib-test-so.cc
new file mode 100644
index 000000000000..686a24578082
--- /dev/null
+++ b/lib/asan/lit_tests/SharedLibs/shared-lib-test-so.cc
@@ -0,0 +1,21 @@
+//===----------- shared-lib-test-so.cc --------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of AddressSanitizer, an address sanity checker.
+//
+//===----------------------------------------------------------------------===//
+#include <stdio.h>
+
+int pad[10];
+int GLOB[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+
+extern "C"
+void inc(int index) {
+ GLOB[index]++;
+}