Hi LibFuzzer Developers,
I'm a junior student from ShanghaiTech University planning to participate in GSoC21, in particular, the idea on Fuzzing LLVM IR passes. Current LLVM fuzzing implementation uses `LLVMFuzzerCustomMutator` for structural mutation (mainly instruction insertion & deletion). I'm trying to add some more mutations like function & basic block insertion or deletion.
Since it is a **set** of mutations instead of just one, the scheduler might want to bias certain mutation instead of others because one may yield more coverage. I wonder if it is possible to get coverage feedback when implementing a custom mutator (Or ways to add multiple mutators)? And how LibFuzzer schedule mutations when using the custom mutator?
```
if (EF->LLVMFuzzerCustomMutator)
Mutators.push_back({&MutationDispatcher::Mutate_Custom, "Custom"});
else
Mutators = DefaultMutators;
if (EF->LLVMFuzzerCustomCrossOver)
Mutators.push_back(
{&MutationDispatcher::Mutate_CustomCrossOver, "CustomCrossOver"});
```
A peek into the constructor of `MutationDispatcher` in `FuzzerMutate.cpp` seems to suggest that when the custom mutator is used, generic mutators like bit flip and byte flip are disabled... Not sure this is the case...
Any suggestion or advice on how to fuzz llvm ir passes are also welcomed! :)
Regards,
Chibin Zhang
2020.3.30