]> git.lizzy.rs Git - rust.git/commit
Implement non-deterministc mode
authorAaron Hill <aa1ronham@gmail.com>
Sun, 7 Apr 2019 22:17:43 +0000 (18:17 -0400)
committerAaron Hill <aa1ronham@gmail.com>
Sun, 7 Apr 2019 23:26:20 +0000 (19:26 -0400)
commit73239573c9290346dd31c50cd3565cb754d86c80
treee2d7b10d7588b5203996d3e4e7ff29c2b9b23ceb
parent68711458b6bc28e7a5e4236a4027355476d23a19
Implement non-deterministc mode

Part of #653

This allows us to properly implement getrandom(),
which unlocks the default HashMap type (e.g. HashMap<K, V>)
with RandomState)

This commit adds a new '-Zmiri-seed=<seed>' option. When present,
this option takes a 64-bit hex value, which is used as the seed
to an internal PRNG. This PRNG is used to implement the 'getrandom()'
syscall.

When '-Zmiri-seed' is not passed, 'getrandom()' will be disabled.
Cargo.toml
src/bin/miri-rustc-tests.rs
src/bin/miri.rs
src/fn_call.rs
src/lib.rs
tests/compile-fail/getrandom.rs [new file with mode: 0644]
tests/run-pass/hashmap.rs