Skip to content

Commit

Permalink
Rollup merge of rust-lang#60780 - RalfJung:miri, r=oli-obk
Browse files Browse the repository at this point in the history
fix Miri

This reverts rust-lang#60156, which turned out to be a dead end (see rust-lang#60469).

r? @oli-obk
  • Loading branch information
Centril authored May 14, 2019
2 parents 3b4234a + 43207ca commit 020111a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/libstd/sys/unix/rand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pub fn hashmap_random_keys() -> (u64, u64) {

#[cfg(all(unix,
not(target_os = "ios"),
not(all(target_os = "macos", miri)),
not(target_os = "openbsd"),
not(target_os = "freebsd"),
not(target_os = "fuchsia")))]
Expand Down Expand Up @@ -107,9 +106,7 @@ mod imp {
// once per thread in `hashmap_random_keys`. Therefore `SecRandomCopyBytes` is
// only used on iOS where direct access to `/dev/urandom` is blocked by the
// sandbox.
// HACK: However, we do use this when running in Miri on macOS; intercepting this is much
// easier than intercepting accesses to /dev/urandom.
#[cfg(any(target_os = "ios", all(target_os = "macos", miri)))]
#[cfg(target_os = "ios")]
mod imp {
use crate::io;
use crate::ptr;
Expand Down

0 comments on commit 020111a

Please sign in to comment.