about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-05-02 07:38:36 +0000
committerbors <bors@rust-lang.org>2019-05-02 07:38:36 +0000
commit758dc9af504e2fe75813bd362619231ecc727898 (patch)
treebba5214e3fd0edcb1e6503afcfcba8f5d93dc5f2 /src/libstd/sys/unix/stack_overflow.rs
parent92b5e20ad59b183a2e6cd79423f54b8aa7ac9cbf (diff)
parent16ad9777b8afd3991b4501e602a04e5e40214b56 (diff)
downloadrust-758dc9af504e2fe75813bd362619231ecc727898.tar.gz
rust-758dc9af504e2fe75813bd362619231ecc727898.zip
Auto merge of #60156 - RalfJung:macos-rand, r=oli-obk,alexcrichton
use SecRandomCopyBytes on macOS in Miri

This is a hack to fix https://github.com/rust-lang/miri/issues/686: on macOS, rustc will open `/dev/urandom` to initialize a `HashMap`. That's quite hard to emulate properly in Miri without a full-blown implementation of file descriptors.  However, Miri needs an implementation of `SecRandomCopyBytes` anyway to support [getrandom](https://crates.io/crates/getrandom), so using it here should work just as well.

This will only have an effect when libstd is compiled specifically for Miri, but that will generally be the case when people use `cargo miri`.

This is clearly a hack, so I am opening this to start a discussion about whether we are okay with such a hack or not.

Cc @oli-obk
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions