summaryrefslogtreecommitdiff
path: root/lib/asan/lit_tests/TestCases/use-after-poison.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asan/lit_tests/TestCases/use-after-poison.cc')
-rw-r--r--lib/asan/lit_tests/TestCases/use-after-poison.cc20
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/asan/lit_tests/TestCases/use-after-poison.cc b/lib/asan/lit_tests/TestCases/use-after-poison.cc
deleted file mode 100644
index e3bc6ecee7f28..0000000000000
--- a/lib/asan/lit_tests/TestCases/use-after-poison.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-// Check that __asan_poison_memory_region works.
-// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s
-//
-// Check that we can disable it
-// RUN: ASAN_OPTIONS=allow_user_poisoning=0 %t
-
-#include <stdlib.h>
-
-extern "C" void __asan_poison_memory_region(void *, size_t);
-
-int main(int argc, char **argv) {
- char *x = new char[16];
- x[10] = 0;
- __asan_poison_memory_region(x, 16);
- int res = x[argc * 10]; // BOOOM
- // CHECK: ERROR: AddressSanitizer: use-after-poison
- // CHECK: main{{.*}}use-after-poison.cc:[[@LINE-2]]
- delete [] x;
- return res;
-}