diff options
author | van Hauser <vh@thc.org> | 2020-09-21 15:47:10 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-09-21 15:47:10 +0200 |
commit | 207cbd5cf7c1956969f42e89bfcb9a0ab451e351 (patch) | |
tree | a66af166a8c5ea07adc570b28d68ed53433876dc /custom_mutators/libfuzzer/FuzzerDriver.cpp | |
parent | f34fe1f81e804bccdda5315968f6a73a47184822 (diff) | |
download | afl++-207cbd5cf7c1956969f42e89bfcb9a0ab451e351.tar.gz |
fix and update libfuzzer custom mutator
Diffstat (limited to 'custom_mutators/libfuzzer/FuzzerDriver.cpp')
-rw-r--r-- | custom_mutators/libfuzzer/FuzzerDriver.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/custom_mutators/libfuzzer/FuzzerDriver.cpp b/custom_mutators/libfuzzer/FuzzerDriver.cpp index 6468a02e..c79278bd 100644 --- a/custom_mutators/libfuzzer/FuzzerDriver.cpp +++ b/custom_mutators/libfuzzer/FuzzerDriver.cpp @@ -77,7 +77,7 @@ struct { } Flags; static const FlagDescription FlagDescriptions[]{ - +\ #define FUZZER_DEPRECATED_FLAG(Name) \ {#Name, "Deprecated; don't use", 0, nullptr, nullptr, nullptr}, #define FUZZER_FLAG_INT(Name, Default, Description) \ @@ -941,23 +941,12 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) { Options.EntropicNumberOfRarestFeatures = (size_t)Flags.entropic_number_of_rarest_features; Options.EntropicScalePerExecTime = Flags.entropic_scale_per_exec_time; - if (Options.Entropic) { - - if (!Options.FocusFunction.empty()) { - - Printf( - "ERROR: The parameters `--entropic` and `--focus_function` cannot " - "be used together.\n"); - exit(1); - - } - + if (!Options.FocusFunction.empty()) + Options.Entropic = false; // FocusFunction overrides entropic scheduling. + if (Options.Entropic) Printf("INFO: Running with entropic power schedule (0x%X, %d).\n", Options.EntropicFeatureFrequencyThreshold, Options.EntropicNumberOfRarestFeatures); - - } - struct EntropicOptions Entropic; Entropic.Enabled = Options.Entropic; Entropic.FeatureFrequencyThreshold = |