|
LLVM
5.0.0
|
#include "Fuzzer/FuzzerTracePC.h"
Public Member Functions | |
| void | HandleInit (uint32_t *Start, uint32_t *Stop) |
| void | HandleInline8bitCountersInit (uint8_t *Start, uint8_t *Stop) |
| void | HandleCallerCallee (uintptr_t Caller, uintptr_t Callee) |
| template<class T > | |
| void | HandleCmp (uintptr_t PC, T Arg1, T Arg2) |
| size_t | GetTotalPCCoverage () |
| void | SetUseCounters (bool UC) |
| void | SetUseValueProfile (bool VP) |
| void | SetPrintNewPCs (bool P) |
| template<class Callback > | |
| void | CollectFeatures (Callback CB) const |
| 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, bool StopAtZero) |
| void | PrintNewPCs () |
| void | InitializePrintNewPCs () |
| size_t | GetNumPCs () const |
| uintptr_t | GetPC (size_t Idx) |
| template<class T > | |
| ATTRIBUTE_TARGET_POPCNT ALWAYS_INLINE ATTRIBUTE_NO_SANITIZE_ALL void | HandleCmp (uintptr_t PC, T Arg1, T Arg2) |
Public Attributes | |
| TableOfRecentCompares < uint32_t, 32 > | TORC4 |
| TableOfRecentCompares < uint64_t, 32 > | TORC8 |
| TableOfRecentCompares< Word, 32 > | TORCW |
| MemMemTable< 1024 > | MMT |
| uint8_t * | Start |
| uint8_t * | Stop |
Static Public Attributes | |
| static const size_t | kNumPCs = 1 << 21 |
| static const size_t | kTracePcBits = 18 |
Definition at line 70 of file FuzzerTracePC.h.
| ATTRIBUTE_NO_SANITIZE_ALL void fuzzer::TracePC::AddValueForMemcmp | ( | void * | caller_pc, |
| const void * | s1, | ||
| const void * | s2, | ||
| size_t | n, | ||
| bool | StopAtZero | ||
| ) |
Definition at line 257 of file FuzzerTracePC.cpp.
References fuzzer::ValueBitMap::AddValue(), fuzzer::FixedWord< 64 >::GetMaxSize(), fuzzer::Hash(), I, fuzzer::FixedWord< 64 >::kMaxSize, fuzzer::min(), and TORCW.
Referenced by __sanitizer_weak_hook_memcmp(), __sanitizer_weak_hook_strcmp(), and __sanitizer_weak_hook_strncmp().
| void fuzzer::TracePC::CollectFeatures | ( | Callback | CB | ) | const |
Referenced by fuzzer::Fuzzer::CrashResistantMergeInternalStep(), and fuzzer::Fuzzer::RunOne().
| void fuzzer::TracePC::DumpCoverage | ( | ) |
Definition at line 237 of file FuzzerTracePC.cpp.
References fuzzer::EF, GetNumPCs(), and fuzzer::GetPreviousInstructionPc().
Referenced by fuzzer::Fuzzer::PrintFinalStats().
|
inline |
Definition at line 110 of file FuzzerTracePC.h.
References kNumPCs, kTracePcBits, and fuzzer::Min().
Referenced by DumpCoverage(), GetPC(), GetTotalPCCoverage(), InitializePrintNewPCs(), PrintCoverage(), PrintNewPCs(), and ResetMaps().
|
inline |
Definition at line 113 of file FuzzerTracePC.h.
References assert(), and GetNumPCs().
| size_t fuzzer::TracePC::GetTotalPCCoverage | ( | ) |
Definition at line 50 of file FuzzerTracePC.cpp.
References GetNumPCs(), and fuzzer::N.
| ATTRIBUTE_NO_SANITIZE_ALL void fuzzer::TracePC::HandleCallerCallee | ( | uintptr_t | Caller, |
| uintptr_t | Callee | ||
| ) |
Definition at line 102 of file FuzzerTracePC.cpp.
References fuzzer::ValueBitMap::AddValueModPrime().
Referenced by __sanitizer_cov_trace_pc_indir().
| ATTRIBUTE_TARGET_POPCNT ALWAYS_INLINE ATTRIBUTE_NO_SANITIZE_ALL void fuzzer::TracePC::HandleCmp | ( | uintptr_t | PC, |
| T | Arg1, | ||
| T | Arg2 | ||
| ) |
Definition at line 287 of file FuzzerTracePC.cpp.
References fuzzer::ValueBitMap::AddValue(), fuzzer::TableOfRecentCompares< T, kSizeT >::Insert(), TORC4, and TORC8.
Definition at line 69 of file FuzzerTracePC.cpp.
References assert(), kNumPCs, P, fuzzer::RawPrint(), Start, and Stop.
Referenced by __sanitizer_cov_trace_pc_guard_init().
| void fuzzer::TracePC::HandleInline8bitCountersInit | ( | uint8_t * | Start, |
| uint8_t * | Stop | ||
| ) |
Definition at line 59 of file FuzzerTracePC.cpp.
References assert(), and Start.
Referenced by __sanitizer_cov_8bit_counters_init().
| void fuzzer::TracePC::InitializePrintNewPCs | ( | ) |
Definition at line 109 of file FuzzerTracePC.cpp.
References assert(), and GetNumPCs().
Referenced by fuzzer::Fuzzer::Loop().
| void fuzzer::TracePC::PrintCoverage | ( | ) |
Definition at line 126 of file FuzzerTracePC.cpp.
References fuzzer::DescribePC(), fuzzer::DirName(), fuzzer::DisassembleCmd(), fuzzer::EF, fuzzer::ExecuteCommandAndReadOutput(), llvm::ARMBuildAttrs::File, GetNumPCs(), fuzzer::IsInterestingCoverageFile(), fuzzer::Printf(), fuzzer::SearchRegexCmd(), and llvm::parallel::sort().
Referenced by fuzzer::Fuzzer::PrintFinalStats().
| void fuzzer::TracePC::PrintFeatureSet | ( | ) |
| void fuzzer::TracePC::PrintModuleInfo | ( | ) |
Definition at line 87 of file FuzzerTracePC.cpp.
References fuzzer::Printf(), Start, and Stop.
Referenced by fuzzer::Fuzzer::Fuzzer().
| void fuzzer::TracePC::PrintNewPCs | ( | ) |
Definition at line 118 of file FuzzerTracePC.cpp.
References assert(), GetNumPCs(), and fuzzer::PrintPC().
|
inline |
Definition at line 86 of file FuzzerTracePC.h.
References fuzzer::ClearExtraCounters(), GetNumPCs(), and fuzzer::ValueBitMap::Reset().
Referenced by fuzzer::Fuzzer::CrashResistantMergeInternalStep(), fuzzer::Fuzzer::ExecuteCallback(), and fuzzer::Fuzzer::Fuzzer().
|
inline |
Definition at line 83 of file FuzzerTracePC.h.
References P.
Referenced by fuzzer::Fuzzer::Fuzzer().
|
inline |
Definition at line 81 of file FuzzerTracePC.h.
Referenced by fuzzer::Fuzzer::Fuzzer().
|
inline |
Definition at line 82 of file FuzzerTracePC.h.
Referenced by fuzzer::Fuzzer::Fuzzer().
Definition at line 72 of file FuzzerTracePC.h.
Referenced by GetNumPCs(), and HandleInit().
Definition at line 74 of file FuzzerTracePC.h.
Referenced by __sanitizer_cov_trace_pc(), and GetNumPCs().
| MemMemTable<1024> fuzzer::TracePC::MMT |
Definition at line 106 of file FuzzerTracePC.h.
Referenced by __sanitizer_weak_hook_memmem(), __sanitizer_weak_hook_strcasestr(), __sanitizer_weak_hook_strstr(), and fuzzer::MutationDispatcher::Mutate_AddWordFromTORC().
| uint8_t* fuzzer::TracePC::Start |
Definition at line 131 of file FuzzerTracePC.h.
Referenced by HandleInit(), HandleInline8bitCountersInit(), and PrintModuleInfo().
| uint8_t * fuzzer::TracePC::Stop |
Definition at line 131 of file FuzzerTracePC.h.
Referenced by HandleInit(), and PrintModuleInfo().
| TableOfRecentCompares<uint32_t, 32> fuzzer::TracePC::TORC4 |
Definition at line 103 of file FuzzerTracePC.h.
Referenced by HandleCmp(), and fuzzer::MutationDispatcher::Mutate_AddWordFromTORC().
| TableOfRecentCompares<uint64_t, 32> fuzzer::TracePC::TORC8 |
Definition at line 104 of file FuzzerTracePC.h.
Referenced by HandleCmp(), and fuzzer::MutationDispatcher::Mutate_AddWordFromTORC().
| TableOfRecentCompares<Word, 32> fuzzer::TracePC::TORCW |
Definition at line 105 of file FuzzerTracePC.h.
Referenced by AddValueForMemcmp(), and fuzzer::MutationDispatcher::Mutate_AddWordFromTORC().
1.8.6