diff options
author | Kostya Serebryany <kcc@google.com> | 2015-10-02 23:34:06 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2015-10-02 23:34:06 +0000 |
commit | 20bb5e71b25ba3f2debef4035dc8b5def7d1763c (patch) | |
tree | a5cd689d494488459339592e88766820a5d1085f /llvm/lib/Fuzzer/test/StrcmpTest.cpp | |
parent | 7dfaaf3891993fb8bbce1c509d263064c7301a19 (diff) | |
download | llvm-20bb5e71b25ba3f2debef4035dc8b5def7d1763c.zip llvm-20bb5e71b25ba3f2debef4035dc8b5def7d1763c.tar.gz llvm-20bb5e71b25ba3f2debef4035dc8b5def7d1763c.tar.bz2 |
[libFuzzer] make LLVMFuzzerTestOneInput (the fuzzer target function) return int instead of void. The actual return value is not *yet* used (and expected to be 0). This change is API breaking, so the fuzzers will need to be updated.
llvm-svn: 249214
Diffstat (limited to 'llvm/lib/Fuzzer/test/StrcmpTest.cpp')
-rw-r--r-- | llvm/lib/Fuzzer/test/StrcmpTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/test/StrcmpTest.cpp b/llvm/lib/Fuzzer/test/StrcmpTest.cpp index 04264fa..835819ae 100644 --- a/llvm/lib/Fuzzer/test/StrcmpTest.cpp +++ b/llvm/lib/Fuzzer/test/StrcmpTest.cpp @@ -16,7 +16,7 @@ bool Eq(const uint8_t *Data, size_t Size, const char *Str) { return res == 0; } -extern "C" void LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { if (Eq(Data, Size, "AAA") && Size >= 3 && Eq(Data + 3, Size - 3, "BBBB") && Size >= 7 && Eq(Data + 7, Size - 7, "CCCCCC") && @@ -25,4 +25,5 @@ extern "C" void LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { fprintf(stderr, "BINGO\n"); exit(1); } + return 0; } |