Commit Graph

3384 Commits

Author SHA1 Message Date
Christian Poveda
9c54368cca Exclude TERM env var by default 2019-08-29 04:07:20 -05:00
bors
ee8afead51 Auto merge of #935 - christianpoveda:blacklist-env-vars, r=RalfJung
Exclude environment variables from host communication

related issue: #933

r? @RalfJung
2019-08-29 08:09:57 +00:00
Christian Poveda
abcda6dc94 Small corrections
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-08-29 03:08:58 -05:00
bors
e3b87f6fe8 Auto merge of #931 - RalfJung:retag-makes-my-head-hurt, r=RalfJung
Stacked Borrows: don't read from memory during retagging

Currently, retagging of a shared reference tries real hard to find the `UnsafeCell` and mark everything else as frozen. We even read enum discriminants to figure out the variant and determine if there is an `UnsafeCell` in there or not.

Unfortunately, that leads to some very hard to analyze behavior: during retagging, we do read accesses, which are subject to the rules of Stacked Borrows and the existing tags! My head hurts when I try to think about this. It's just too recursive.

This PR simplifies the semantics by treating enums like unions: if any variant has an `UnsafeCell`, the entire thing behaves like an `UnsafeCell`. This means retagging no longer has to read from memory, the way it affects the stack is entirely determined by the type.
2019-08-29 06:40:23 +00:00
Christian Poveda
f4a25e530a Add env exclusion test 2019-08-28 17:57:41 -05:00
Christian Poveda
c1cec3b247 Exclude env vars using flag 2019-08-28 17:57:41 -05:00
Christian Poveda
1ae1d71938 Add -Zmiri-env-exclude flag 2019-08-28 17:57:35 -05:00
bors
26615807de Auto merge of #930 - RalfJung:build, r=RalfJung
test that build scripts do not run in Miri

@elichai reported something that sounded a lot like build script running in Miri. But as this test shows, build scripts are not run by Miri, they are run normally.

@elichai are you sure the [env var usage you were referring to](https://github.com/rust-lang/miri/issues/641#issuecomment-524989482) was only in a build script? Those shouldn't be affected by Miri flags at all. Is your code available somewhere so that I can try to reproduce?
2019-08-28 20:23:39 +00:00
Ralf Jung
f3ff10005a small optimization 2019-08-28 18:45:10 +02:00
Ralf Jung
79dd70fd9b Stacked Borrows: don't read from memory during retagging 2019-08-28 18:41:30 +02:00
Ralf Jung
7faa329f11 more implicit 2019-08-28 09:27:19 +02:00
Ralf Jung
71aae4ffa5 test that build scripts do not run in Miri 2019-08-28 09:15:31 +02:00
bors
283928ad55 Auto merge of #925 - christianpoveda:environ-shim, r=RalfJung
Write name and value for each env var

In order to res0lve https://github.com/rust-lang/miri/issues/756 is necessary to have the whole `"NAME=VALUE"` sequence of bytes written into memory instead of just the value.

This change does not affect the interface of the `shim::envs::EnvVars` type in any way.

r? @RalfJung @oli-obk
2019-08-27 15:59:32 +00:00
Christian Poveda
7d93cc7b5e Add docs 2019-08-27 08:45:37 -05:00
bors
69268fb75f Auto merge of #927 - RalfJung:getrandom, r=RalfJung
explicitly enable getrandom/std feature

This seems to be what rand_core does, and then we need to do it as well or else the rustc feature checker complains.
2019-08-27 13:14:14 +00:00
Ralf Jung
283829c5c1 explicitly enable getrandom/std feature 2019-08-27 15:12:12 +02:00
bors
2be0db4c0b Auto merge of #917 - RalfJung:isolation, r=oli-obk
change flag name: enable-communication -> disable-isolation

r? @oli-obk  -- I think this is a better name for the flag but it is still somewhat clumsy. Suggestions?
2019-08-27 10:02:07 +00:00
bors
cae0a5e179 Auto merge of #926 - RalfJung:rustup, r=RalfJung
rustup
2019-08-27 06:45:59 +00:00
Ralf Jung
26afb4685d hashmap ICEs with optimizations, temporarily disable 2019-08-27 08:42:36 +02:00
Ralf Jung
3a68d943ba rustup 2019-08-27 08:32:31 +02:00
Christian Poveda
ace3416cf2 Write name and value for each env var 2019-08-26 18:08:26 -05:00
bors
f72ffb988c Auto merge of #924 - RalfJung:getrandom, r=RalfJung
decrease getrandom version

so that we dont have to bump Cargo.toml in rustc
2019-08-26 18:54:14 +00:00
Ralf Jung
63ec6e6467 decrease getrandom version so that we dont have to bump Cargo.toml in rustc 2019-08-26 20:53:45 +02:00
bors
601a3f1e22 Auto merge of #922 - RalfJung:rustup, r=RalfJung
bump Rust and xargo
2019-08-26 18:13:47 +00:00
Ralf Jung
c6c9276d61 bump Rust and xargo 2019-08-26 19:44:27 +02:00
bors
ae1d269a8e Auto merge of #921 - RalfJung:cargo-update, r=RalfJung
cargo update
2019-08-26 17:39:34 +00:00
Ralf Jung
0340806127 cargo update 2019-08-26 19:38:47 +02:00
Ralf Jung
55efee9140 test host randomness access 2019-08-23 23:30:23 +02:00
Ralf Jung
97f9fb1284 change flag name: enable-communication -> disable-isolation 2019-08-23 23:29:11 +02:00
bors
631d5facba Auto merge of #914 - christianpoveda:use-host-rng, r=RalfJung
Use host's rng when communication is enabled

This uses the host's randomness when the communication enabled flag is used. I am not sure about the error handling. I was thinking about fallbacking to `rand` if `getrandom` fails and also print something so the user knows miri is not using the host's rng because it failed. Let me know what you think.

Related issue: https://github.com/rust-lang/miri/issues/800.

r? @RalfJung @oli-obk
2019-08-23 09:52:54 +00:00
bors
d77fe6c63c Auto merge of #915 - RalfJung:rustup, r=RalfJung
bump Rust
2019-08-21 07:09:35 +00:00
Ralf Jung
1be4e2ff58 bump Rust 2019-08-21 09:07:27 +02:00
Christian Poveda
f53b5b0fb4 Update -Zmiri-enable-communication docs 2019-08-20 12:22:49 -05:00
Christian Poveda
98129631b5 Use err_unsup_format instead 2019-08-20 12:20:50 -05:00
bors
fd078e4fac Auto merge of #837 - RalfJung:arrays, r=RalfJung
test arrray try_from (interesting const generic usage)

Currently fails, see https://github.com/rust-lang/rust/pull/62435#issuecomment-511100890.

Blocked on https://github.com/rust-lang/rust/issues/62790.
2019-08-20 14:16:00 +00:00
Ralf Jung
3b14567e36 bump Rust 2019-08-20 16:11:11 +02:00
Ralf Jung
a76bc3fb87 test arrray try_from (interesting const generic usage) 2019-08-20 16:11:03 +02:00
Christian Poveda
b44fd97af6 Use host's rng when communication is enabled 2019-08-19 10:43:09 -05:00
bors
9d14a62628 Auto merge of #913 - RalfJung:uninit, r=RalfJung
test some new uninit APIs
2019-08-18 11:39:31 +00:00
Ralf Jung
be4108e27c test some new uninit APIs 2019-08-18 11:34:09 +02:00
bors
285a585fd0 Auto merge of #912 - RalfJung:rustup, r=RalfJung
fix test failure due to my own lint
2019-08-18 09:16:40 +00:00
Ralf Jung
94cd0ce734 fix test failure due to my own lint 2019-08-18 11:16:02 +02:00
bors
b5c70e92f3 Auto merge of #911 - RalfJung:typed-op, r=RalfJung
Adjust for typed binops
2019-08-18 05:48:20 +00:00
Ralf Jung
d7ff7ccbad update Rust 2019-08-18 07:43:18 +02:00
Ralf Jung
4f1c9bb607 adjust for typed binary/unary_op 2019-08-18 07:42:15 +02:00
bors
bfd6181d34 Auto merge of #859 - RalfJung:cargo, r=RalfJung
travis: do not install cargo from master

This tests the rpath hackery in `./miri`.
2019-08-15 20:51:52 +00:00
Ralf Jung
65541d9021 rustup update 2019-08-15 22:30:38 +02:00
Ralf Jung
5aa60571fc travis: do not install cargo from master 2019-08-15 22:25:50 +02:00
bors
4f6f264c30 Auto merge of #909 - RalfJung:deny-warn, r=oli-obk
deny warnings on CI
2019-08-15 09:37:38 +00:00
Ralf Jung
f9241be734 fix warning 2019-08-15 11:24:04 +02:00