Skip to content

Commit d778d4f

Browse files
committed
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
1 parent 2267c58 commit d778d4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler-rt/lib/fuzzer/FuzzerRandom.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#include <random>
1515

1616
namespace fuzzer {
17-
class Random : public std::minstd_rand {
17+
class Random : public std::mt19937 {
1818
public:
19-
Random(unsigned int seed) : std::minstd_rand(seed) {}
20-
result_type operator()() { return this->std::minstd_rand::operator()(); }
19+
Random(unsigned int seed) : std::mt19937(seed) {}
20+
result_type operator()() { return this->std::mt19937::operator()(); }
2121
size_t Rand() { return this->operator()(); }
2222
size_t RandBool() { return Rand() % 2; }
2323
size_t operator()(size_t n) { return n ? Rand() % n : 0; }

0 commit comments

Comments
 (0)