SuccessChanges

Summary

  1. [libFuzzer] Scale energy assigned to each input based on input execution time. (details)
  2. [Sema] Fix a -Warc-repeated-use-of-weak false-positive by only calling CheckPlaceholderExpr once (details)
Commit 5cda4dc7b4d28fcd11307d4234c513ff779a1c6f by dokyungs
[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
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerDriver.cpp (diff)
The file was modifiedcompiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp (diff)
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerLoop.cpp (diff)
The file was addedcompiler-rt/test/fuzzer/EntropicScalePerExecTimeTest.cpp
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerOptions.h (diff)
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerFlags.def (diff)
The file was addedcompiler-rt/test/fuzzer/entropic-scale-per-exec-time.test
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerCorpus.h (diff)
Commit 0f1be87e294751a0941f1d9b7785ebf4d8072149 by erik.pilkington
[Sema] Fix a -Warc-repeated-use-of-weak false-positive by only calling CheckPlaceholderExpr once

Previously, this code discarded the result of CheckPlaceholderExpr for
non-matrix subexpressions. Not only is this wasteful, but it was creating a
Warc-repeated-use-of-weak false-positive on the attached testcase, since the
discarded expression was still registered as a use of the weak property.

rdar://66162246

Differential revision: https://reviews.llvm.org/D87102
The file was modifiedclang/test/SemaObjC/arc-repeated-weak.mm (diff)
The file was modifiedclang/lib/Sema/SemaExpr.cpp (diff)