Christian Poveda
e57447014d
Duplicate compile-fail tests for intptrcast
2019-06-21 16:32:54 -05:00
Ralf Jung
04fa38dd1b
allow some inequality comparisons between pointers and integers
2019-06-20 16:38:55 +02:00
Ralf Jung
7ce36226e6
implement and test unchecked_{add,sub,mul} intrinsics
2019-06-16 11:10:33 +02:00
Ralf Jung
cf748149ce
test unchecked_rem
2019-06-16 11:10:33 +02:00
Ralf Jung
fc90124489
test exact_div UB detection
2019-06-16 11:10:33 +02:00
Ralf Jung
9f48b3029c
test that we cannot access unescaped static memory with a raw ptr
2019-06-02 22:16:02 +02:00
Ralf Jung
e03255d625
fix existing tests
...
fix thread-local example to no longer write to pointers derived from a shared ref;
fix compile-fail test
2019-06-02 22:16:02 +02:00
Ralf Jung
0dfc1c97c5
test weak_into_raw
2019-05-29 19:36:16 +02:00
Ralf Jung
f10ab1991c
fix error pattern
2019-05-27 19:37:31 +02:00
Ralf Jung
74f98b3803
test for new read rules
2019-05-21 15:43:18 +02:00
Ralf Jung
4b9e1544c2
give up on two-phase borrows
2019-05-17 15:02:31 +02:00
Ralf Jung
f676f2265b
make writes act stack-like
2019-05-15 18:12:58 +02:00
Ralf Jung
617195eb12
add arielby's example
2019-04-30 20:18:29 +02:00
Ralf Jung
d410b13139
fix compile-fail ref files
2019-04-21 13:18:05 +02:00
Ralf Jung
287ffb8bba
test another version of 'creating a shared ref must not leak the Unique'
2019-04-19 08:46:40 +02:00
Ralf Jung
7d9dc6e698
test that creating a 2nd mutable ref from a NonNull invalidates the first
2019-04-18 14:43:25 +02:00
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