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/CxxTokensTest.cpp | |
parent | 7dfaaf3891993fb8bbce1c509d263064c7301a19 (diff) | |
download | bcm5719-llvm-20bb5e71b25ba3f2debef4035dc8b5def7d1763c.tar.gz bcm5719-llvm-20bb5e71b25ba3f2debef4035dc8b5def7d1763c.zip |
[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/CxxTokensTest.cpp')
-rw-r--r-- | llvm/lib/Fuzzer/test/CxxTokensTest.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Fuzzer/test/CxxTokensTest.cpp b/llvm/lib/Fuzzer/test/CxxTokensTest.cpp index 77d08b3d105..82773231569 100644 --- a/llvm/lib/Fuzzer/test/CxxTokensTest.cpp +++ b/llvm/lib/Fuzzer/test/CxxTokensTest.cpp @@ -10,9 +10,9 @@ static void Found() { exit(1); } -extern "C" void LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { // looking for "thread_local unsigned A;" - if (Size < 24) return; + if (Size < 24) return 0; if (0 == memcmp(&Data[0], "thread_local", 12)) if (Data[12] == ' ') if (0 == memcmp(&Data[13], "unsigned", 8)) @@ -20,5 +20,6 @@ extern "C" void LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { if (Data[22] == 'A') if (Data[23] == ';') Found(); + return 0; } |