diff options
Diffstat (limited to 'lib/Fuzzer/test/SimpleThreadedTest.cpp')
| -rw-r--r-- | lib/Fuzzer/test/SimpleThreadedTest.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/Fuzzer/test/SimpleThreadedTest.cpp b/lib/Fuzzer/test/SimpleThreadedTest.cpp deleted file mode 100644 index 1abdc3fc6d6b..000000000000 --- a/lib/Fuzzer/test/SimpleThreadedTest.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. - -// Threaded test for a fuzzer. The fuzzer should find "H" -#include <assert.h> -#include <cstddef> -#include <cstdint> -#include <cstring> -#include <iostream> -#include <thread> - -extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { - auto C = [&] { - if (Size >= 2 && Data[0] == 'H') { - std::cout << "BINGO; Found the target, exiting\n"; - abort(); - } - }; - std::thread T[] = {std::thread(C), std::thread(C), std::thread(C), - std::thread(C), std::thread(C), std::thread(C)}; - for (auto &X : T) - X.join(); - return 0; -} - |
