mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 19:38:09 +00:00
fix and update libfuzzer custom mutator
This commit is contained in:
@ -17,7 +17,8 @@
|
||||
|
||||
namespace fuzzer {
|
||||
|
||||
const size_t Dictionary::kMaxDictSize;
|
||||
const size_t Dictionary::kMaxDictSize;
|
||||
static const size_t kMaxMutationsToPrint = 10;
|
||||
|
||||
static void PrintASCII(const Word &W, const char *PrintAfter) {
|
||||
|
||||
@ -608,18 +609,24 @@ void MutationDispatcher::PrintRecommendedDictionary() {
|
||||
|
||||
}
|
||||
|
||||
void MutationDispatcher::PrintMutationSequence() {
|
||||
void MutationDispatcher::PrintMutationSequence(bool Verbose) {
|
||||
|
||||
Printf("MS: %zd ", CurrentMutatorSequence.size());
|
||||
for (auto M : CurrentMutatorSequence)
|
||||
Printf("%s-", M.Name);
|
||||
size_t EntriesToPrint =
|
||||
Verbose ? CurrentMutatorSequence.size()
|
||||
: std::min(kMaxMutationsToPrint, CurrentMutatorSequence.size());
|
||||
for (size_t i = 0; i < EntriesToPrint; i++)
|
||||
Printf("%s-", CurrentMutatorSequence[i].Name);
|
||||
if (!CurrentDictionaryEntrySequence.empty()) {
|
||||
|
||||
Printf(" DE: ");
|
||||
for (auto DE : CurrentDictionaryEntrySequence) {
|
||||
EntriesToPrint = Verbose ? CurrentDictionaryEntrySequence.size()
|
||||
: std::min(kMaxMutationsToPrint,
|
||||
CurrentDictionaryEntrySequence.size());
|
||||
for (size_t i = 0; i < EntriesToPrint; i++) {
|
||||
|
||||
Printf("\"");
|
||||
PrintASCII(DE->GetW(), "\"-");
|
||||
PrintASCII(CurrentDictionaryEntrySequence[i]->GetW(), "\"-");
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user