[PATCH] D73776: Entropic: Boosting LibFuzzer Performance
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 20 01:03:10 PDT 2020
vitalybuka added inline comments.
================
Comment at: compiler-rt/lib/fuzzer/FuzzerCorpus.h:59
+public:
+ size_t NumExecutedMutations = 0;
+ InputCorpus(const std::string &OutputCorpus, bool Entropic,
----------------
please make field private and add access method if it's needed outside
================
Comment at: compiler-rt/lib/fuzzer/FuzzerCorpus.h:242
+ bool DeleteFeatureFreq(InputInfo *II, uint32_t Idx) {
+ if (II->FeatureFreqs.empty())
----------------
DeleteFeatureFreq -> InputInfo::DeleteFeatureFreq
================
Comment at: compiler-rt/lib/fuzzer/FuzzerCorpus.h:264
+ FreqOfMostAbundantRareFeature > ConsideredRare) {
+ uint32_t ST_mostAbundantRareFeatureIdx =
+ RareFeatures[0]; // 1st most abd feature index
----------------
uint32_t MostAbundantRareFeatureIdx[2] = {}
or
just
MostAbundantRareFeatureIdx1
MostAbundantRareFeatureIdx2
================
Comment at: compiler-rt/lib/fuzzer/FuzzerCorpus.h:336
+ void UpdateFeatureFrequency(InputInfo *II, size_t Idx) {
+ uint32_t Idx32 = Idx % kFeatureSetSize;
----------------
InputInfo::UpdateFeatureFrequency
================
Comment at: compiler-rt/lib/fuzzer/FuzzerCorpus.h:387
+ // let II->Energy approach the true entropy from above.
+ void UpdateEnergy(InputInfo *II, size_t GlobalNumberOfFeatures) {
+ long double Energy = 0.0L;
----------------
InputInfo::UpdateEnergy
================
Comment at: compiler-rt/lib/fuzzer/FuzzerCorpus.h:388
+ void UpdateEnergy(InputInfo *II, size_t GlobalNumberOfFeatures) {
+ long double Energy = 0.0L;
+ size_t SumIncidence = 0;
----------------
"long double" is still there?
================
Comment at: compiler-rt/lib/fuzzer/FuzzerFlags.def:156
"will choose the focus functions automatically.")
+FUZZER_FLAG_INT(entropic, 0, "Experimental. Enables entropic power schedule.")
+FUZZER_FLAG_INT(considered_rare, 0xFF, "Experimental. If entropic is enabled, "
----------------
vitalybuka wrote:
> entropic -> focus_rare_features
>
>
> Not sure how, it would be nice to rename sparse_energy_updates as something meaningful to libfuzzer user, to make it explain behavior change, not implementation details like now.
many of comments are marked as "Done" but I see no changes.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73776/new/
https://reviews.llvm.org/D73776
More information about the llvm-commits
mailing list