[libFuzzer] Make dataflow and focus functions more user friendly.
authorMax Moroz <mmoroz@chromium.org>
Fri, 31 Jan 2020 21:19:03 +0000 (13:19 -0800)
committerMax Moroz <mmoroz@chromium.org>
Mon, 3 Feb 2020 16:36:03 +0000 (08:36 -0800)
commitad7b908b4ef973a139fc8b78dd95990e66aabbe3
treef6f2df6d791ddbdea4b6bb5ad2a4837b422b4ae7
parent333f2ad8b840abee8b3dcb112329e380ff3b5afd
[libFuzzer] Make dataflow and focus functions more user friendly.

Summary:
- Fail loudly if SetFocusFunction failed when it should not. For more info see
  - https://github.com/google/oss-fuzz/issues/3311
  - https://github.com/google/sanitizers/issues/1190
- Fail loudly if CollectDataFlow is called without seed corpus.

Reviewers: kcc, metzman

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D73813
compiler-rt/lib/fuzzer/FuzzerDataFlowTrace.cpp
compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
compiler-rt/test/fuzzer/dataflow.test
compiler-rt/test/fuzzer/focus-function.test [moved from compiler-rt/test/fuzzer/target-function.test with 87% similarity]