diff options
author | Kostya Serebryany <kcc@google.com> | 2015-07-31 17:05:05 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2015-07-31 17:05:05 +0000 |
commit | cd6a4665e0eba0987b4bf47eff51f976f3d6968d (patch) | |
tree | b013097d40e4949a181eaed3eaad743a4f024f82 /llvm/lib/Fuzzer/test/SwitchTest.cpp | |
parent | 4cd5faaa876ce6970bc4c70f2e07cf2ae2140133 (diff) | |
download | llvm-cd6a4665e0eba0987b4bf47eff51f976f3d6968d.zip llvm-cd6a4665e0eba0987b4bf47eff51f976f3d6968d.tar.gz llvm-cd6a4665e0eba0987b4bf47eff51f976f3d6968d.tar.bz2 |
[libFuzzer] support switch interception in dfsan mode
llvm-svn: 243760
Diffstat (limited to 'llvm/lib/Fuzzer/test/SwitchTest.cpp')
-rw-r--r-- | llvm/lib/Fuzzer/test/SwitchTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Fuzzer/test/SwitchTest.cpp b/llvm/lib/Fuzzer/test/SwitchTest.cpp index 6e300aa..0f2319b 100644 --- a/llvm/lib/Fuzzer/test/SwitchTest.cpp +++ b/llvm/lib/Fuzzer/test/SwitchTest.cpp @@ -1,9 +1,9 @@ // Simple test for a fuzzer. The fuzzer must find the interesting switch value. #include <cstdint> #include <cstdlib> +#include <cstdio> #include <cstring> #include <cstddef> -#include <iostream> static volatile int Sink; @@ -28,7 +28,7 @@ bool Switch(const uint8_t *Data, size_t Size) { extern "C" void LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { if (Switch<int>(Data, Size) && Size >= 12 && Switch<uint64_t>(Data + 4, Size - 4)) { - std::cout << "BINGO; Found the target, exiting\n"; + fprintf(stderr, "BINGO; Found the target, exiting\n"); exit(1); } } |