aboutsummaryrefslogtreecommitdiff
path: root/lib/asan/output_tests/interception_malloc_test-linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asan/output_tests/interception_malloc_test-linux.cc')
-rw-r--r--lib/asan/output_tests/interception_malloc_test-linux.cc19
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/asan/output_tests/interception_malloc_test-linux.cc b/lib/asan/output_tests/interception_malloc_test-linux.cc
deleted file mode 100644
index 4bb3bd66de33..000000000000
--- a/lib/asan/output_tests/interception_malloc_test-linux.cc
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-
-extern "C" void *__interceptor_malloc(size_t size);
-extern "C" void *malloc(size_t size) {
- write(2, "malloc call\n", sizeof("malloc call\n") - 1);
- return __interceptor_malloc(size);
-}
-
-int main() {
- char *x = (char*)malloc(10 * sizeof(char));
- free(x);
- return (int)strtol(x, 0, 10);
-}
-
-// Check-Common: malloc call
-// Check-Common: heap-use-after-free
-