diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:46:15 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:46:15 +0000 |
commit | dd58ef019b700900793a1eb48b52123db01b654e (patch) | |
tree | fcfbb4df56a744f4ddc6122c50521dd3f1c5e196 /lib/Fuzzer/test/DFSanSimpleCmpTest.cpp | |
parent | 2fe5752e3a7c345cdb59e869278d36af33c13fa4 (diff) |
Notes
Diffstat (limited to 'lib/Fuzzer/test/DFSanSimpleCmpTest.cpp')
-rw-r--r-- | lib/Fuzzer/test/DFSanSimpleCmpTest.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/Fuzzer/test/DFSanSimpleCmpTest.cpp b/lib/Fuzzer/test/DFSanSimpleCmpTest.cpp deleted file mode 100644 index ee378146dae1..000000000000 --- a/lib/Fuzzer/test/DFSanSimpleCmpTest.cpp +++ /dev/null @@ -1,30 +0,0 @@ -// Simple test for a fuzzer. The fuzzer must find several narrow ranges. -#include <cstdint> -#include <cstdlib> -#include <cstring> -#include <cstdio> - -extern "C" void LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { - if (Size < 14) return; - uint64_t x = 0; - int64_t y = 0; - int z = 0; - unsigned short a = 0; - memcpy(&x, Data, 8); - memcpy(&y, Data + Size - 8, 8); - memcpy(&z, Data + Size / 2, sizeof(z)); - memcpy(&a, Data + Size / 2 + 4, sizeof(a)); - - if (x > 1234567890 && - x < 1234567895 && - y >= 987654321 && - y <= 987654325 && - z < -10000 && - z >= -10005 && - z != -10003 && - a == 4242) { - fprintf(stderr, "BINGO; Found the target: size %zd (%zd, %zd, %d, %d), exiting.\n", - Size, x, y, z, a); - exit(1); - } -} |