From d778d4fdedbadb7a72a357e79dcbafdeec900044 Mon Sep 17 00:00:00 2001 From: Jeremy Morse Date: Thu, 31 Jan 2019 12:44:14 +0000 Subject: [PATCH] Revert r352732: [libFuzzer] replace slow std::mt19937 with a much faster std::minstd_rand This causes a failure on the following bot as well as our internal ones: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/23103 llvm-svn: 352747 --- compiler-rt/lib/fuzzer/FuzzerRandom.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler-rt/lib/fuzzer/FuzzerRandom.h b/compiler-rt/lib/fuzzer/FuzzerRandom.h index 4dde7d84d889..f475797871cb 100644 --- a/compiler-rt/lib/fuzzer/FuzzerRandom.h +++ b/compiler-rt/lib/fuzzer/FuzzerRandom.h @@ -14,10 +14,10 @@ #include namespace fuzzer { -class Random : public std::minstd_rand { +class Random : public std::mt19937 { public: - Random(unsigned int seed) : std::minstd_rand(seed) {} - result_type operator()() { return this->std::minstd_rand::operator()(); } + Random(unsigned int seed) : std::mt19937(seed) {} + result_type operator()() { return this->std::mt19937::operator()(); } size_t Rand() { return this->operator()(); } size_t RandBool() { return Rand() % 2; } size_t operator()(size_t n) { return n ? Rand() % n : 0; }