about summary refs log tree commit diff
path: root/src/tools/miri/tests/pass-dep/getrandom.rs
blob: c0d9296a9a6d9ef4a9de768422b4742b2e685220 (plain)
1
2
3
4
5
6
7
8
9
10
// mac-os `getrandom_01` does some pointer shenanigans
//@compile-flags: -Zmiri-permissive-provenance

/// Test direct calls of getrandom 0.1 and 0.2.
/// Make sure they work even with isolation enabled (i.e., we do not hit a file-based fallback path).
fn main() {
    let mut data = vec![0; 16];
    getrandom_01::getrandom(&mut data).unwrap();
    getrandom_02::getrandom(&mut data).unwrap();
}