diff options
| author | Mike Aizatsky <aizatsky@chromium.org> | 2016-06-07 20:22:15 +0000 |
|---|---|---|
| committer | Mike Aizatsky <aizatsky@chromium.org> | 2016-06-07 20:22:15 +0000 |
| commit | 41d6683c39d3fcaeb005cc13efca9fd82ff89463 (patch) | |
| tree | 1142cb439f568a240aff91d668cff87f0583ccc8 /llvm/lib/Fuzzer/FuzzerInterface.h | |
| parent | 22bfa83208e8ea51c827f4ab62792ddd7b63d8a6 (diff) | |
| download | bcm5719-llvm-41d6683c39d3fcaeb005cc13efca9fd82ff89463.tar.gz bcm5719-llvm-41d6683c39d3fcaeb005cc13efca9fd82ff89463.zip | |
[libfuzzer] custom crossover interface function.
Differential Revision: http://reviews.llvm.org/D21089
llvm-svn: 272054
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerInterface.h')
| -rw-r--r-- | llvm/lib/Fuzzer/FuzzerInterface.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerInterface.h b/llvm/lib/Fuzzer/FuzzerInterface.h index 8d27f2e7f48..d47e20e3a2b 100644 --- a/llvm/lib/Fuzzer/FuzzerInterface.h +++ b/llvm/lib/Fuzzer/FuzzerInterface.h @@ -45,6 +45,15 @@ int LLVMFuzzerInitialize(int *argc, char ***argv); size_t LLVMFuzzerCustomMutator(uint8_t *Data, size_t Size, size_t MaxSize, unsigned int Seed); +// Optional user-provided custom cross-over function. +// Combines pieces of Data1 & Data2 together into Out. +// Returns the new size, which is not greater than MaxOutSize. +// Should produce the same mutation given the same Seed. +size_t LLVMFuzzerCustomCrossOver(const uint8_t *Data1, size_t Size1, + const uint8_t *Data2, size_t Size2, + uint8_t *Out, size_t MaxOutSize, + unsigned int Seed); + // Experimental, may go away in future. // libFuzzer-provided function to be used inside LLVMFuzzerTestOneInput. // Mutates raw data in [Data, Data+Size) inplace. |

