[PATCH] D16419: Use std::piecewise_constant_distribution instead of ad-hoc binary search.

Ivan Krasin via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 11:28:04 PST 2016


krasin added inline comments.

================
Comment at: lib/Fuzzer/FuzzerInternal.h:287
@@ -282,1 +286,3 @@
 
+  std::mt19937 Generator;
+  std::piecewise_constant_distribution<double> CorpusDistribution;
----------------
kcc wrote:
> We should not be using yet another random generator, we already have one. 
> Please use it. (USF.GetRand())
USF.GetRand does not meet the requirements for UniformRandomNumberGenerator: http://en.cppreference.com/w/cpp/concept/UniformRandomNumberGenerator and that is needed to use std::piecewise_constant_distribution.

Should I change USF.GetRand definition to be more standard-compliant?


http://reviews.llvm.org/D16419





More information about the llvm-commits mailing list