This patch adds an option "cross_over_uniform_dist", which, if 1, utilizes all
inputs in the corpus for the crossover mutation. More specifically, this patch
uses a uniform distribution of all inputs in the corpus for the CrossOver input
selection. Note that input selection for mutation is still fully determined by
the scheduling policy (i.e., vanilla or Entropic); the uniform distribution only
applies to the secondary input selection, only for the crossover mutation of the
base input chosen by the scheduling policy. This way the corpus inputs that have
useful fragments in them, even though they are deprioritized by the scheduling
policy, have chances of getting mixed with other inputs that are prioritized and
selected as base input for mutation.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Time | Test | |
---|---|---|
80 ms | windows > LLVM.Other::change-printer.ll |
Event Timeline
compiler-rt/test/fuzzer/cross_over_uniform_dist.test | ||
---|---|---|
3 | Will revisit this test after getting the keep seed patch upstreamed. |
compiler-rt/lib/fuzzer/FuzzerFlags.def | ||
---|---|---|
32 | Please also document when this is useful. |
compiler-rt/lib/fuzzer/FuzzerCorpus.h | ||
---|---|---|
274–279 | nit: short branch first: if (!UniformDist) return ChooseUnitToMutate(Rand); ... |
Comment Actions
Fix cross_over_uniform_dist.test. If -cross_over_uniform_dist=1, it takes 766,756 execs to find the crash; if 0, it takes more than 2,000,000 execs to find the crash.
Comment Actions
Adjust the test - make sure corpus/B input does not discover any more coverage than corpus/A, so that it's not scheduled for mutation even with -keep_seed=1. Only with uniform distribution. corpus/B has chances of getting crossed over with.
clang-tidy: warning: invalid case style for function 'ChooseUnitToCrossOverWith' [readability-identifier-naming]
not useful