[all-commits] [llvm/llvm-project] 5cda4d: [libFuzzer] Scale energy assigned to each input ba...

Dokyung Song via All-commits all-commits at lists.llvm.org
Thu Sep 3 13:47:32 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5cda4dc7b4d28fcd11307d4234c513ff779a1c6f
      https://github.com/llvm/llvm-project/commit/5cda4dc7b4d28fcd11307d4234c513ff779a1c6f
  Author: Dokyung Song <dokyungs at google.com>
  Date:   2020-09-03 (Thu, 03 Sep 2020)

  Changed paths:
    M compiler-rt/lib/fuzzer/FuzzerCorpus.h
    M compiler-rt/lib/fuzzer/FuzzerDriver.cpp
    M compiler-rt/lib/fuzzer/FuzzerFlags.def
    M compiler-rt/lib/fuzzer/FuzzerLoop.cpp
    M compiler-rt/lib/fuzzer/FuzzerOptions.h
    M compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp
    A compiler-rt/test/fuzzer/EntropicScalePerExecTimeTest.cpp
    A compiler-rt/test/fuzzer/entropic-scale-per-exec-time.test

  Log Message:
  -----------
  [libFuzzer] Scale energy assigned to each input based on input execution time.

This patch scales the energy computed by the Entropic schedule based on the
execution time of each input. The input execution time is compared with the
average execution time of inputs in the corpus, and, based on the amount by
which they differ, the energy is scaled from 0.1x (for inputs executing slow) to
3x (for inputs executing fast). Note that the exact scaling criteria and formula
is borrowed from AFL.

On FuzzBench, this gives a sizeable throughput increase, which in turn leads to
more coverage on several benchmarks. For details, see the following report.

https://storage.googleapis.com/fuzzer-test-suite-public/exectime-report/index.html

Differential Revision: https://reviews.llvm.org/D86092




More information about the All-commits mailing list