Ralf Jung
e1ed855a44
more tests -- also one showing why we are not done yet
2019-04-17 16:02:57 +02:00
Ralf Jung
72cec0562c
add tests for fixes: sharing no longer leaks, and we can handle entering interior mutability
2019-04-17 16:02:57 +02:00
Ralf Jung
46d5fd8487
barriers are dead, long live protectors -- this enables overlapping two-phase borrows!
2019-04-17 16:02:57 +02:00
Ralf Jung
ef52be031c
adjust compile-fail error messages
...
This also passes miri-test-libstd!
2019-04-17 16:02:57 +02:00
Ralf Jung
6fdc75024b
Merge branch 'master' into rand
2019-04-16 20:55:58 +02:00
Ralf Jung
af2b42de0a
fix compile-fail test
2019-04-16 19:09:41 +02:00
Ralf Jung
ceca7c5020
tweak entropy tests a bit
2019-04-16 19:06:08 +02:00
Ralf Jung
a246116bdc
rustup
2019-04-14 10:30:00 +02:00
Aaron Hill
ae8e7f654a
Fix compile-fail error message
2019-04-09 10:19:29 -04:00
Aaron Hill
9243680588
Use 'ignore-' instead of 'only-'
...
Apparently 'ignore-' doesn't work with compiletest_rs
2019-04-08 23:52:33 -04:00
Aaron Hill
5e07ff6b1f
Only run 'getrandom' test on Linux
2019-04-08 23:16:13 -04:00
Aaron Hill
6d3e93c281
Refactor random number generation
2019-04-08 22:22:41 -04:00
Aaron Hill
5530d295ad
Simplify cast using as_mut_ptr()
2019-04-08 21:36:35 -04:00
Aaron Hill
73239573c9
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.
2019-04-07 19:26:20 -04:00
Oliver Scherer
56c7656568
Remove dead code and docs
2019-03-11 10:28:03 +01:00
Alexander Regueiro
12d3ecbaff
Various cosmetic improvements.
2019-02-26 18:37:46 +00:00
Alexander Regueiro
a478bfebd2
Removed copyright notices.
2019-02-26 18:37:45 +00:00
Ralf Jung
3c652032c0
be more clear which stack we are talking about
2019-02-12 10:51:03 +01:00
Ralf Jung
48ac35f072
panic_impl is another way to panic
2019-02-06 11:41:45 +01:00
Ralf Jung
79bdec8a9c
fix test for latest nightly
2018-12-22 16:07:50 +01:00
Ralf Jung
7e9098ff69
treat ref-to-raw cast like a reborrow: do a special kind of retag
2018-12-12 11:11:20 +01:00
Ralf Jung
f044205b5f
the test suite assumes a libstd with full MIR; run test suite on xargo-built foreign libstds
2018-12-10 10:04:55 +01:00
Ralf Jung
bbdc3380d5
fix tests
2018-12-07 10:15:25 +01:00
Ralf Jung
36a2b89522
remove a whole lot of unnecessary attributes
2018-12-02 11:26:09 +01:00
Ralf Jung
58309956c1
for now, we allow Undef in raw pointers as we do in integers
2018-11-27 14:26:23 +01:00
Ralf Jung
7d623f73cc
do not use 'let _', it is strange
2018-11-26 15:31:53 +01:00
Ralf Jung
22f11b8eec
make tests compatible with 2018 edition
2018-11-20 14:15:14 +01:00
Ralf Jung
827e5180f2
stacked borrows is broken without full MIR
2018-11-16 10:01:54 +01:00
Ralf Jung
c93f6d6bb0
Merge remote-tracking branch 'origin/master' into escape-to-raw
2018-11-16 09:41:47 +01:00
Ralf Jung
70738bf8cc
where there is 2, there should be 1
2018-11-16 08:53:43 +01:00
Ralf Jung
ca7b088aba
remove type system tests
2018-11-16 08:50:44 +01:00
Ralf Jung
ba8eb7608e
add an interesting demo for &mut being unique
2018-11-15 09:35:40 +01:00
Ralf Jung
a87e952102
Separate deref and access into different operations; add special exception for creating raw references
2018-11-15 09:35:40 +01:00
Ralf Jung
a94e197105
better test the special exception for reading through unique when things are shared
2018-11-15 09:35:40 +01:00
Ralf Jung
94e751267c
add another mean test case
2018-11-15 09:35:40 +01:00
Ralf Jung
09919c2b59
Retag is the only operation that generates new tags
2018-11-15 09:35:40 +01:00
Ralf Jung
d694dc43f4
bump Rust version
2018-11-08 08:35:14 +01:00
Ralf Jung
74635a57e2
re-do large parts of stacked borrows, now with proper support for partiall frozen data
2018-11-08 08:29:34 +01:00
Ralf Jung
efd2f0e0e4
move new test to correct dir
2018-11-03 12:33:14 +01:00
Ralf Jung
e68687b840
test that we check the layout constraints as early as we can
2018-11-03 12:25:57 +01:00
Ralf Jung
5f42aa61d5
illegal_write2 does not work with optimizations
2018-11-03 10:23:50 +01:00
Ralf Jung
81534496dc
rename RefKind to UsageKind, because it not only used for references now
2018-11-01 08:58:03 +01:00
Ralf Jung
85f821d7e9
unify checks on memory access and reborrowing, and update for Machine trait change
2018-11-01 08:58:03 +01:00
Ralf Jung
bba3c49e84
basic retagging (no fn_entry); this also makes us catch more bugs even with optimizations and we can finally stop mutating the state on deref
2018-11-01 08:58:03 +01:00
Ralf Jung
7ac0e79ad5
stub Retag hook; fix tests for removal of -Zmir-emit-validate
2018-11-01 08:58:03 +01:00
Ralf Jung
40b7502613
Reject atomic arithmetic on non-integer types
...
Fixes #181
2018-10-31 11:04:35 +01:00
Ralf Jung
1fa0ff88c0
fix nits
2018-10-30 10:41:01 +01:00
Ralf Jung
356369dd08
test against passing invalid shared refs around
2018-10-23 16:01:22 +02:00
Ralf Jung
5388037f8a
remove code duplication by letting reactivatable() compute what reactivate() has to do
2018-10-23 15:59:50 +02:00
Ralf Jung
fe83ef323c
also run compile-fail tests with and without optimizations
2018-10-23 13:09:17 +02:00