diff options
author | Kostya Serebryany <kcc@google.com> | 2019-05-09 21:29:45 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2019-05-09 21:29:45 +0000 |
commit | e9aaa5582fa164e8fbcf819c672c02f5f5448e6c (patch) | |
tree | 3ae54b1392a51c1eeebc6b43e7c0bac41ab208d8 /compiler-rt/lib/fuzzer/FuzzerLoop.cpp | |
parent | 12faa0d44bf7009b5868b565f5cda8159abafb17 (diff) | |
download | bcm5719-llvm-e9aaa5582fa164e8fbcf819c672c02f5f5448e6c.tar.gz bcm5719-llvm-e9aaa5582fa164e8fbcf819c672c02f5f5448e6c.zip |
[libFuzzer] implement -focus_function=auto, to be used with Data Flow Traces
llvm-svn: 360378
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerLoop.cpp')
-rw-r--r-- | compiler-rt/lib/fuzzer/FuzzerLoop.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerLoop.cpp b/compiler-rt/lib/fuzzer/FuzzerLoop.cpp index fd5b226a135..d1ad3e37efa 100644 --- a/compiler-rt/lib/fuzzer/FuzzerLoop.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerLoop.cpp @@ -157,8 +157,9 @@ Fuzzer::Fuzzer(UserCallback CB, InputCorpus &Corpus, MutationDispatcher &MD, AllocateCurrentUnitData(); CurrentUnitSize = 0; memset(BaseSha1, 0, sizeof(BaseSha1)); - TPC.SetFocusFunction(Options.FocusFunction); - DFT.Init(Options.DataFlowTrace, Options.FocusFunction); + auto FocusFunctionOrAuto = Options.FocusFunction; + DFT.Init(Options.DataFlowTrace, &FocusFunctionOrAuto , MD.GetRand()); + TPC.SetFocusFunction(FocusFunctionOrAuto); } Fuzzer::~Fuzzer() {} |