[PATCH] D73776: Entropic: Boosting LibFuzzer Performance
Kostya Serebryany via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 15 14:42:14 PDT 2020
kcc added inline comments.
================
Comment at: compiler-rt/lib/fuzzer/FuzzerCorpus.h:132
+
+ struct EntropicOptions Entropic;
+
----------------
here and below: remove 'struct'.
================
Comment at: compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp:595
Random Rand(0);
- std::unique_ptr<InputCorpus> C(new InputCorpus(""));
+ struct EntropicOptions Entropic = {false, 0xFF, 100};
+ std::unique_ptr<InputCorpus> C(new InputCorpus("", Entropic));
----------------
When running 'ninja check-fuzzer' this test fails for me:
That's weird: why does the functionality change with Entropic off?
[5/9] Running Fuzzer unit tests
FAIL: LLVMFuzzer-Unittest :: ./Fuzzer-x86_64-Test/Corpus.Distribution (48 of 55)
******************** TEST 'LLVMFuzzer-Unittest :: ./Fuzzer-x86_64-Test/Corpus.Distribution' FAILED ********************
Note: Google Test filter = Corpus.Distribution
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Corpus
[ RUN ] Corpus.Distribution
/usr/local/google/home/kcc/llvm-project/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp:609: Failure
Expected: (Hist[i]) > (TriesPerUnit / N / 3), actual: 0 vs 2184
/usr/local/google/home/kcc/llvm-project/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp:609: Failure
Expected: (Hist[i]) > (TriesPerUnit / N / 3), actual: 0 vs 2184
/usr/local/google/home/kcc/llvm-project/compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp:609: Failure
================
Comment at: compiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp:1100
+ Vector<std::pair<uint32_t, uint16_t>> FeatureFreqs = {
+ std::pair<uint32_t, uint16_t>(1, 3),
+ std::pair<uint32_t, uint16_t>(2, 3),
----------------
Will a simpler syntax work, e.g.:
{1,3},
{2,3}
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73776/new/
https://reviews.llvm.org/D73776
More information about the llvm-commits
mailing list