diff options
author | Kostya Serebryany <kcc@google.com> | 2017-03-24 00:45:15 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2017-03-24 00:45:15 +0000 |
commit | 382730ab23aa7d14bd66c90d9a31ddc22d496f56 (patch) | |
tree | 07381092d7f17c6b325326828bdf3b0906515d1e /llvm/lib/Fuzzer/test/FuzzerUnittest.cpp | |
parent | f96f04d6023f715e0272545bf4a5323c7308394c (diff) | |
download | bcm5719-llvm-382730ab23aa7d14bd66c90d9a31ddc22d496f56.tar.gz bcm5719-llvm-382730ab23aa7d14bd66c90d9a31ddc22d496f56.zip |
[libFuzzer] increase kFeatureSetSize to 2^21 and make InputCorpus scale to that size. This will potentially make libFuzzer more sensitive on targets with lots of signals
llvm-svn: 298671
Diffstat (limited to 'llvm/lib/Fuzzer/test/FuzzerUnittest.cpp')
-rw-r--r-- | llvm/lib/Fuzzer/test/FuzzerUnittest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp b/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp index 5705396f451..78ea874f2ce 100644 --- a/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp +++ b/llvm/lib/Fuzzer/test/FuzzerUnittest.cpp @@ -586,15 +586,15 @@ TEST(FuzzerUtil, Base64) { TEST(Corpus, Distribution) { Random Rand(0); - InputCorpus C(""); + std::unique_ptr<InputCorpus> C(new InputCorpus("")); size_t N = 10; size_t TriesPerUnit = 1<<16; for (size_t i = 0; i < N; i++) - C.AddToCorpus(Unit{ static_cast<uint8_t>(i) }, 0); + C->AddToCorpus(Unit{ static_cast<uint8_t>(i) }, 0); std::vector<size_t> Hist(N); for (size_t i = 0; i < N * TriesPerUnit; i++) { - Hist[C.ChooseUnitIdxToMutate(Rand)]++; + Hist[C->ChooseUnitIdxToMutate(Rand)]++; } for (size_t i = 0; i < N; i++) { // A weak sanity check that every unit gets invoked. |