|
LLVM
4.0.0
|
#include <FuzzerTracePC.h>
Public Member Functions | |
| void | HandleTrace (uint32_t *guard, uintptr_t PC) |
| void | HandleInit (uint32_t *start, uint32_t *stop) |
| void | HandleCallerCallee (uintptr_t Caller, uintptr_t Callee) |
| void | HandleValueProfile (size_t Value) |
| template<class T > | |
| void | HandleCmp (void *PC, T Arg1, T Arg2) |
| size_t | GetTotalPCCoverage () |
| void | SetUseCounters (bool UC) |
| void | SetUseValueProfile (bool VP) |
| void | SetPrintNewPCs (bool P) |
| template<class Callback > | |
| size_t | CollectFeatures (Callback CB) |
| bool | UpdateValueProfileMap (ValueBitMap *MaxValueProfileMap) |
| void | ResetMaps () |
| void | UpdateFeatureSet (size_t CurrentElementIdx, size_t CurrentElementSize) |
| void | PrintFeatureSet () |
| void | PrintModuleInfo () |
| void | PrintCoverage () |
| void | DumpCoverage () |
| void | AddValueForMemcmp (void *caller_pc, const void *s1, const void *s2, size_t n) |
| void | AddValueForStrcmp (void *caller_pc, const char *s1, const char *s2, size_t n) |
| bool | UsingTracePcGuard () const |
| void | PrintNewPCs () |
| void | InitializePrintNewPCs () |
| size_t | GetNumPCs () const |
| uintptr_t | GetPC (size_t Idx) |
| template<class T > | |
| ATTRIBUTE_TARGET_POPCNT void | HandleCmp (void *PC, T Arg1, T Arg2) |
Public Attributes | |
| TableOfRecentCompares < uint32_t, kTORCSize > | TORC4 |
| TableOfRecentCompares < uint64_t, kTORCSize > | TORC8 |
Static Public Attributes | |
| static const size_t | kFeatureSetSize = ValueBitMap::kNumberOfItems |
| static const size_t | kTORCSize = 1 << 5 |
Definition at line 45 of file FuzzerTracePC.h.
| ATTRIBUTE_NO_SANITIZE_MEMORY void fuzzer::TracePC::AddValueForMemcmp | ( | void * | caller_pc, |
| const void * | s1, | ||
| const void * | s2, | ||
| size_t | n | ||
| ) |
Definition at line 214 of file FuzzerTracePC.cpp.
References HandleValueProfile(), I, fuzzer::min(), PC, and fuzzer::TPC.
Referenced by __sanitizer_weak_hook_memcmp().
| ATTRIBUTE_NO_SANITIZE_MEMORY void fuzzer::TracePC::AddValueForStrcmp | ( | void * | caller_pc, |
| const char * | s1, | ||
| const char * | s2, | ||
| size_t | n | ||
| ) |
Definition at line 232 of file FuzzerTracePC.cpp.
References HandleValueProfile(), I, fuzzer::min(), PC, and fuzzer::TPC.
Referenced by __sanitizer_weak_hook_strcmp(), and __sanitizer_weak_hook_strncmp().
| size_t fuzzer::TracePC::CollectFeatures | ( | Callback | CB | ) |
Definition at line 120 of file FuzzerTracePC.h.
References assert(), llvm::tgtok::Bit, Counter, fuzzer::ValueBitMap::ForEach(), i, fuzzer::Min(), N, and UsingTracePcGuard().
Referenced by fuzzer::Fuzzer::CrashResistantMergeInternalStep(), and fuzzer::Fuzzer::RunOne().
| void fuzzer::TracePC::DumpCoverage | ( | ) |
Definition at line 199 of file FuzzerTracePC.cpp.
References GetNumPCs().
Referenced by fuzzer::Fuzzer::PrintFinalStats().
|
inline |
Definition at line 89 of file FuzzerTracePC.h.
References fuzzer::Min().
Referenced by DumpCoverage(), GetPC(), GetTotalPCCoverage(), InitializePrintNewPCs(), PrintCoverage(), and PrintNewPCs().
|
inline |
Definition at line 90 of file FuzzerTracePC.h.
References assert(), and GetNumPCs().
| size_t fuzzer::TracePC::GetTotalPCCoverage | ( | ) |
Definition at line 38 of file FuzzerTracePC.cpp.
References GetNumPCs(), and i.
| void fuzzer::TracePC::HandleCallerCallee | ( | uintptr_t | Caller, |
| uintptr_t | Callee | ||
| ) |
Definition at line 63 of file FuzzerTracePC.cpp.
References HandleValueProfile().
| ATTRIBUTE_TARGET_POPCNT void fuzzer::TracePC::HandleCmp | ( | void * | PC, |
| T | Arg1, | ||
| T | Arg2 | ||
| ) |
Definition at line 254 of file FuzzerTracePC.cpp.
References Arg2, HandleValueProfile(), fuzzer::TableOfRecentCompares< T, kSizeT >::Insert(), PC, TORC4, and TORC8.
Definition at line 46 of file FuzzerTracePC.cpp.
| void fuzzer::TracePC::HandleTrace | ( | uint32_t * | guard, |
| uintptr_t | PC | ||
| ) |
|
inline |
Definition at line 52 of file FuzzerTracePC.h.
References fuzzer::ValueBitMap::AddValue().
Referenced by AddValueForMemcmp(), AddValueForStrcmp(), HandleCallerCallee(), and HandleCmp().
| void fuzzer::TracePC::InitializePrintNewPCs | ( | ) |
Definition at line 82 of file FuzzerTracePC.cpp.
References assert(), GetNumPCs(), and i.
Referenced by fuzzer::Fuzzer::Loop().
| void fuzzer::TracePC::PrintCoverage | ( | ) |
Definition at line 99 of file FuzzerTracePC.cpp.
References fuzzer::DescribePC(), fuzzer::DirName(), fuzzer::EF, fuzzer::ExecuteCommandAndReadOutput(), llvm::ARMBuildAttrs::File, GetNumPCs(), i, fuzzer::IsInterestingCoverageFile(), PC, and fuzzer::Printf().
Referenced by fuzzer::Fuzzer::PrintFinalStats().
| void fuzzer::TracePC::PrintFeatureSet | ( | ) |
| void fuzzer::TracePC::PrintModuleInfo | ( | ) |
Definition at line 56 of file FuzzerTracePC.cpp.
References i, and fuzzer::Printf().
Referenced by fuzzer::Fuzzer::Fuzzer().
| void fuzzer::TracePC::PrintNewPCs | ( | ) |
Definition at line 91 of file FuzzerTracePC.cpp.
References assert(), GetNumPCs(), i, and fuzzer::PrintPC().
|
inline |
Definition at line 63 of file FuzzerTracePC.h.
References fuzzer::ValueBitMap::Reset().
Referenced by fuzzer::Fuzzer::CrashResistantMergeInternalStep(), fuzzer::Fuzzer::ExecuteCallback(), fuzzer::Fuzzer::FindExtraUnits(), and fuzzer::Fuzzer::Fuzzer().
|
inline |
Definition at line 57 of file FuzzerTracePC.h.
References P.
Referenced by fuzzer::Fuzzer::Fuzzer().
|
inline |
Definition at line 55 of file FuzzerTracePC.h.
Referenced by fuzzer::Fuzzer::Fuzzer().
|
inline |
Definition at line 56 of file FuzzerTracePC.h.
Referenced by fuzzer::Fuzzer::Fuzzer().
| void fuzzer::TracePC::UpdateFeatureSet | ( | size_t | CurrentElementIdx, |
| size_t | CurrentElementSize | ||
| ) |
|
inline |
Definition at line 59 of file FuzzerTracePC.h.
References fuzzer::ValueBitMap::MergeFrom().
|
inline |
Definition at line 81 of file FuzzerTracePC.h.
Referenced by CollectFeatures().
|
static |
Definition at line 47 of file FuzzerTracePC.h.
|
static |
Definition at line 83 of file FuzzerTracePC.h.
| TableOfRecentCompares<uint32_t, kTORCSize> fuzzer::TracePC::TORC4 |
Definition at line 84 of file FuzzerTracePC.h.
Referenced by HandleCmp(), and fuzzer::MutationDispatcher::Mutate_AddWordFromTORC().
| TableOfRecentCompares<uint64_t, kTORCSize> fuzzer::TracePC::TORC8 |
Definition at line 85 of file FuzzerTracePC.h.
Referenced by HandleCmp(), and fuzzer::MutationDispatcher::Mutate_AddWordFromTORC().
1.8.6