diff options
author | Kostya Serebryany <kcc@google.com> | 2018-05-16 23:26:37 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2018-05-16 23:26:37 +0000 |
commit | e7a38f86feb619a9bcd31871559f6455e21748bf (patch) | |
tree | 585603398b256d9374e0c55eadd8100f7067a585 /lib/fuzzer/FuzzerTracePC.h | |
parent | 851bfbce9fffe4a357445f9780331c7590b9f0aa (diff) |
[libFuzzer] add an experimental flag -focus_function: libFuzzer will try to focus on inputs that trigger that function
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@332554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/fuzzer/FuzzerTracePC.h')
-rw-r--r-- | lib/fuzzer/FuzzerTracePC.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/fuzzer/FuzzerTracePC.h b/lib/fuzzer/FuzzerTracePC.h index d68da76b2..e1db5127c 100644 --- a/lib/fuzzer/FuzzerTracePC.h +++ b/lib/fuzzer/FuzzerTracePC.h @@ -131,6 +131,9 @@ class TracePC { CB(PC); } + void SetFocusFunction(const std::string &FuncName); + bool ObservedFocusFunction(); + private: bool UseCounters = false; bool UseValueProfile = false; @@ -163,6 +166,9 @@ private: Set<uintptr_t> ObservedPCs; Set<uintptr_t> ObservedFuncs; + std::pair<size_t, size_t> FocusFunction = {-1, -1}; // Module and PC IDs. + + ValueBitMap ValueProfileMap; uintptr_t InitialStack; }; |