summaryrefslogtreecommitdiff
path: root/lib/Fuzzer/test/TraceMallocTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Fuzzer/test/TraceMallocTest.cpp')
-rw-r--r--lib/Fuzzer/test/TraceMallocTest.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/Fuzzer/test/TraceMallocTest.cpp b/lib/Fuzzer/test/TraceMallocTest.cpp
deleted file mode 100644
index af9975603aa1..000000000000
--- a/lib/Fuzzer/test/TraceMallocTest.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-
-// Tests -trace_malloc
-#include <assert.h>
-#include <cstddef>
-#include <cstdint>
-#include <cstdlib>
-#include <iostream>
-
-int *Ptr;
-
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
- if (!Size) return 0;
- if (*Data == 1) {
- delete Ptr;
- Ptr = nullptr;
- } else if (*Data == 2) {
- delete Ptr;
- Ptr = new int;
- } else if (*Data == 3) {
- if (!Ptr)
- Ptr = new int;
- }
- return 0;
-}
-