[libFuzzer] Extend the fuzz target intarface to allow -1 return value.
authorKostya Serebryany <kcc@google.com>
Tue, 28 Jun 2022 18:36:30 +0000 (11:36 -0700)
committerKostya Serebryany <kcc@google.com>
Thu, 30 Jun 2022 20:21:27 +0000 (13:21 -0700)
commit92fb310151d2b1e349695fc0f1c5d5d50afb3b52
tree7be38fb25dbd02034459bfe5e3b6dd7554a8c084
parente633f8cd1411b0465bde3d92523c2fb97a5f9922
[libFuzzer] Extend the fuzz target intarface to allow -1 return value.

With this change, fuzz targets may choose to return -1
to indicate that the input should not be added to the corpus
regardless of the coverage it generated.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D128749
compiler-rt/lib/fuzzer/FuzzerInternal.h
compiler-rt/lib/fuzzer/FuzzerLoop.cpp
compiler-rt/test/fuzzer/Reject.cpp [new file with mode: 0644]
compiler-rt/test/fuzzer/not-instrumented.test
compiler-rt/test/fuzzer/reject.test [new file with mode: 0644]
llvm/docs/LibFuzzer.rst