From 41d6683c39d3fcaeb005cc13efca9fd82ff89463 Mon Sep 17 00:00:00 2001 From: Mike Aizatsky Date: Tue, 7 Jun 2016 20:22:15 +0000 Subject: [libfuzzer] custom crossover interface function. Differential Revision: http://reviews.llvm.org/D21089 llvm-svn: 272054 --- llvm/lib/Fuzzer/FuzzerInterface.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'llvm/lib/Fuzzer/FuzzerInterface.h') 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. -- cgit v1.2.3