Skip to content

Commit 1221562

Browse files
committed
Merge pull request #1970 from apple/deterministic-PRNG-in-SwiftPrivate
2 parents 8681578 + c5a11b0 commit 1221562

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

stdlib/public/stubs/LibcShims.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ size_t _swift_stdlib_malloc_size(const void *ptr) {
6666
#error No malloc_size analog known for this platform/libc.
6767
#endif
6868

69-
static std::random_device RandomeDevice;
70-
static std::mt19937 MersenneRandom(RandomeDevice());
69+
static std::mt19937 MersenneRandom;
7170

7271
__swift_uint32_t _swift_stdlib_cxx11_mt19937(void) {
7372
return MersenneRandom();

validation-test/stdlib/Hashing.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
// FIXME: This test fails with some expected probability because
2-
// it is testing the statistical nature of the hashing.
3-
// The test failing probabilistically is bad for regression testing,
4-
// which causes test failures for this test to both be largely
5-
// ignored but also can cause the entire test suite to fail
6-
// unexpectedly.
7-
//
8-
// This test is being DISABLED until it is written in a way
9-
// for it to be reliable and useful.
10-
//
11-
121
// RUN: %target-run-stdlib-swift
132
// REQUIRES: executable_test
143

0 commit comments

Comments
 (0)