bors
45113eb6a4
Auto merge of #1325 - RalfJung:float_to_int_unchecked, r=RalfJung
...
implement float_to_int_unchecked
@hanna-kruppe would be great if you could have a look at this.
`float.rs` tests legal casts. `test_cast` checks that both `as` casts and unchecked casts work (i.e., these are not saturating). The `compile-fail` tests should ensure that illegal casts via the intrinsic are detected as such.
Fixes https://github.com/rust-lang/miri/issues/1264
2020-04-18 08:13:24 +00:00
Ralf Jung
bb38ab4340
use u128::MAX symbolic name
2020-04-18 10:11:45 +02:00
Ralf Jung
0345ee42da
some UB gets masked by optimizations
2020-04-18 09:15:59 +02:00
Ralf Jung
c6ab27577b
test that we check dynamic actual size of object
2020-04-18 02:06:36 +02:00
Ralf Jung
521e77d712
test that we properly check dynamic alignment
2020-04-17 20:43:54 +02:00
Ralf Jung
e6822d60b3
make sure we find some things without validation or stacked borrows, respectively
2020-04-14 10:23:47 +02:00
Ralf Jung
179e78d0ad
make sure our disable flags do not miss all bugs; move type-assert intrinsic tests to their folder
2020-04-14 10:23:47 +02:00
Ralf Jung
f4a15444cf
fix comment in alignment test
2020-04-14 09:50:20 +02:00
Ralf Jung
fd8beaf5c4
add option to disable alignment checks
2020-04-13 17:58:03 +02:00
Ralf Jung
17c52d47e7
add tests for invalid float-to-int casts
2020-04-12 12:01:20 +02:00
Ralf Jung
30d07c8616
move error-pattern to inline annotation where possible
2020-04-12 12:01:20 +02:00
Ralf Jung
b2bf4ec2f5
organize compile-fail tests in folders
2020-04-11 11:36:55 +02:00
Ralf Jung
d276d952ff
fix unused warnings in tests
2020-04-10 10:27:59 +02:00
bors
325682ad56
Auto merge of #1301 - RalfJung:global-leaks, r=RalfJung
...
memory reachable through globals is not a leak
Blocked on https://github.com/rust-lang/rust/pull/70762
Fixes https://github.com/rust-lang/miri/issues/940
2020-04-07 17:33:24 +00:00
Ralf Jung
7841f44593
rustup
2020-04-07 19:33:03 +02:00
David Cook
134d6a2faa
Add tests, improve test coverage
2020-04-05 14:55:57 -05:00
David Cook
d5d5a56926
Add tests
2020-04-05 13:25:49 -05:00
Ralf Jung
cd132f563e
port compile-fail allocator tests to stable API
2020-04-02 13:33:59 +02:00
Ralf Jung
5130aa55a2
adjust stacktrace printing to rustc changes
2020-04-02 09:14:17 +02:00
bors
f4308a0728
Auto merge of #1267 - RalfJung:macos-dtors, r=RalfJung
...
implement TLS cleanup for macOS
Now that I can run macOS interpretation locally, this was not that hard to fix. ;)
Fixes https://github.com/rust-lang/miri/issues/443
2020-03-28 07:55:42 +00:00
Ralf Jung
c5ef8a656f
enable leak tests on macOS
2020-03-27 19:39:35 +01:00
JOE1994
ea836eeb0d
remove or update 'ignore-windows' annotations in some tests
2020-03-27 14:18:19 -04:00
Ralf Jung
47b91e619a
test unreachable intrinsic
2020-03-25 09:32:15 +01:00
Ralf Jung
d85f09c4e4
platform -> target
2020-03-22 08:55:39 +01:00
Ralf Jung
238ed49a07
detect UB: overflow in copy/write_bytes
2020-03-21 17:54:33 +01:00
Ralf Jung
8acfafe186
test for zero-sized write_bytes to NULL
2020-03-21 17:54:18 +01:00
Ralf Jung
e890d4d5e1
call error location was fixed by rustup
2020-03-21 12:52:23 +01:00
Ralf Jung
5c09047411
fix tests
2020-03-21 10:54:56 +01:00
Ralf Jung
bde3111c61
test windows panic message
2020-03-21 10:17:57 +01:00
Ralf Jung
49051e05ea
rustup, and some final message adjustments
2020-03-19 08:41:01 +01:00
Ralf Jung
e1e158e103
adjust error messages for lower-case start
2020-03-19 08:26:08 +01:00
Ralf Jung
77cc0cddd9
add test for validation finding use-after-free
2020-03-19 08:25:08 +01:00
Ralf Jung
1103a10e2c
adjust for error reform
2020-03-19 08:25:08 +01:00
Elichai Turkel
0826899ca0
Remove uninhabit/zeroed tests to a new test file for abort checking
2020-03-18 14:14:23 +02:00
Ralf Jung
8a26a288c2
rustup
2020-03-16 21:32:57 +01:00
Ralf Jung
497fbcbf44
rustup, fix for intrinsic rename and transmute error change
2020-03-14 09:27:35 +01:00
Ralf Jung
5531a79f4c
rustup, test Abort terminator
2020-03-12 20:48:04 +01:00
Ralf Jung
5ef48593fb
adjust error
2020-03-09 17:03:39 +01:00
Christian Poveda
8392a0c589
only expose environ on linux
2020-03-08 10:16:31 -05:00
Christian Poveda
18a71ef7b3
minor corrections
2020-03-07 11:35:00 -05:00
Christian Poveda
6eccc809f2
test that environ
gets deallocated on changes
2020-03-07 09:39:55 -05:00
Ralf Jung
148269dd4b
finally stop using min/max_value and the integer modules
2020-03-04 13:01:06 +01:00
Ralf Jung
db0d03229c
fix allocator tests
2020-03-04 10:19:35 +01:00
Ralf Jung
88c45f9891
adjust for rustc changes
2020-03-02 13:51:08 +01:00
Ralf Jung
274ae0438f
add an option to disable Stacked Borrows
2020-02-24 16:22:02 +01:00
Ralf Jung
8acf52b3ca
fix compile-fail tests to avoid libstd debug assertions
2020-02-16 14:01:00 +01:00
Ralf Jung
d208a5fe3b
rustup; fix generator test
2020-02-07 14:02:27 +01:00
Ralf Jung
5d2caef3ce
also test div-by-minus-1
2020-02-06 11:24:38 +01:00
Ralf Jung
4b6a0d7a8e
bump rustc; adjust tests
2020-02-06 11:20:28 +01:00
Ralf Jung
e0adfe4d45
new compile-fail test involving non-reborrowing-cast-to-raw
2020-01-30 12:22:15 +01:00
Tim Diekmann
3d8bf92a11
Rename Alloc
to AllocRef
...
Required to land https://github.com/rust-lang/rust/pull/68529 . Please see that PR for details. The CI is expected to fail until the PR is landed.
2020-01-29 04:10:33 +01:00
Ralf Jung
e952e37a39
compile-fail tests work with optimizations now
2019-12-29 12:38:40 +01:00
Oliver Scherer
d9859c83fc
Rustup to rustc 1.42.0-nightly ( 9ff30a781
2019-12-21)
2019-12-21 11:45:09 +01:00
Ralf Jung
74ef63ff0a
the never type got de-stabilized again; adjust tests
2019-12-15 12:23:43 +01:00
Ralf Jung
f0d43872ad
add test for sketchy vtable
2019-12-13 13:19:48 +01:00
Ralf Jung
cefc592273
bump Rust, fix error messages
2019-12-08 01:45:41 +01:00
Ralf Jung
6d8e87111b
bump Rust for exact_div fix
2019-12-03 17:37:42 +01:00
Ralf Jung
ae53b1222a
fix and expand panic tests
2019-12-02 16:04:31 +01:00
Ralf Jung
dcdd68b936
also indicate abort via new MachineStop variant
2019-12-02 09:13:58 +01:00
Ralf Jung
6941caf1df
typo
2019-11-22 18:12:10 +01:00
Ralf Jung
6888555ca9
rustup for never stabilization
2019-11-22 09:50:22 +01:00
Ralf Jung
5cef4666e6
rename panic=abort tests to panic_abort
2019-11-19 22:44:07 +01:00
Aaron Hill
b06d99b8a0
Ignore '-C panic=abort' tests for now
...
We are currently building `libpanic_abort` with the wrong panic
strategy, due to Xargo missing a hack used by `bootstrap`.
2019-11-17 08:40:34 -05:00
Aaron Hill
08d3fbc76b
Support unwinding after a panic
...
Fixes #658
This commit adds support for unwinding after a panic. It requires a
companion rustc PR to be merged, in order for the necessary hooks to
work properly.
Currently implemented:
* Selecting between unwind/abort mode based on the rustc Session
* Properly popping off stack frames, unwinding back the caller
* Running 'unwind' blocks in Mir terminators
Not yet implemented:
* 'Abort' terminators
This PR was getting fairly large, so I decided to open it for review without
implementing 'Abort' terminator support. This could either be added on
to this PR, or merged separately.
2019-11-17 08:34:25 -05:00
Ralf Jung
64244e9a18
do full deref-check before reborrowing
2019-11-14 10:24:02 +01:00
Ralf Jung
428fc531d8
silence a lint that catches the bug statically
2019-11-07 09:44:00 +01:00
Ralf Jung
1f8cb476ea
fix test erorr msg
2019-11-06 09:24:26 +01:00
Ralf Jung
c4f1d3f488
test that 0 cannot be offset-inbounds by 0
2019-11-06 09:24:26 +01:00
Ralf Jung
fcf0f886d4
adjust tests
2019-11-03 10:15:55 +01:00
Christian Poveda
61da8b8428
Add OsString from/to bytes helper functions
2019-10-18 09:47:19 -05:00
Ralf Jung
8ecd767791
fix test failure from diagnostics change
2019-09-29 11:30:28 -04:00
Christian Poveda
145a5826d5
Check that chdir
fails for non-utf8 paths
2019-09-24 17:28:38 -05:00
Oliver Scherer
b952584186
Rustup to 1.39.0-nightly ( 1e869133b
2019-09-09)
2019-09-09 13:00:20 +02:00
Ralf Jung
f67af5a1c2
test too big slice
2019-08-31 08:41:55 +02:00
Ralf Jung
cecbe1611b
test for invalid wide raw ptr
2019-08-29 17:19:09 +02:00
Ralf Jung
94cd0ce734
fix test failure due to my own lint
2019-08-18 11:16:02 +02:00
Ralf Jung
2f95d4d50c
remove dead code
2019-08-15 11:01:03 +02:00
Ralf Jung
60a0688185
adjust tests for eager pointer checks on deref
2019-08-15 11:01:03 +02:00
Ralf Jung
b93629262d
test that even &Cell must be dereferencable
2019-08-09 19:22:47 +02:00
bors
b09ae31da0
Auto merge of #871 - RalfJung:miri-rustc-cleanup, r=RalfJung
...
Cleanup after rustc bootstrap tests Miri with a separate libstd
Should only be merged after https://github.com/rust-lang/rust/pull/63162 got the green light.
2019-08-08 20:43:47 +00:00
Ralf Jung
d26917a9d6
fix for latest rustc
2019-08-05 10:45:48 +02:00
Ralf Jung
f47e58950b
check that atomics are sufficiently aligned, and add test
2019-08-04 10:30:42 +02:00
Ralf Jung
a41ec9aacb
adjust error messages in tests
2019-08-03 20:54:57 +02:00
Ralf Jung
bff6b05424
more consistent test name
2019-08-03 17:27:50 +02:00
Ralf Jung
773f6aeb4c
remove some compile-fail tests that now work
2019-08-03 15:01:04 +02:00
Ralf Jung
2973063fa3
test dangling ZST deref
2019-08-02 14:26:15 +02:00
Ralf Jung
c4c2716f4e
make reborrow shallow, and fix tests for that
2019-08-02 08:09:22 +02:00
Ralf Jung
6c545ba340
the compile-fail-norustc hack is no longer needed
2019-07-31 15:29:55 +02:00
Ralf Jung
d5ca345c36
remove redundant tests / flags
2019-07-23 23:26:25 +02:00
Ralf Jung
3c1ab78196
review failing compile-fail tests
2019-07-23 23:25:06 +02:00
Ralf Jung
59190e8542
disable some compile-fail tests for rustc
2019-07-20 22:38:41 +02:00
Ralf Jung
95e6e671bf
fix compile-fail tests for latest rustc
2019-07-16 18:39:18 +02:00
Ralf Jung
4f6a56f54f
better error message when the program tries to spawn a thread
2019-07-06 10:07:21 +02:00
Ralf Jung
b29cb7d551
avoid catching errors
2019-07-03 10:56:25 +02:00
Ralf Jung
0bb50ada34
make sure we catch alignment problems even with intrptrcast
2019-06-29 14:31:54 +02:00
Christian Poveda
792d665a1f
Fix merge conflicts
2019-06-25 00:57:33 -05:00
Ralf Jung
7e7b5d42ba
Apply suggestions from code review
...
Co-Authored-By: Oliver Scherer <github35764891676564198441@oli-obk.de>
2019-06-24 14:50:27 +02:00
Ralf Jung
4d65aa8f20
expand and better explain alignment check tests
2019-06-24 08:40:45 +02:00
Ralf Jung
4dc188a60e
adjust for refactored memory pointer checks
2019-06-23 20:19:26 +02:00
Christian Poveda
e57447014d
Duplicate compile-fail tests for intptrcast
2019-06-21 16:32:54 -05:00
Ralf Jung
5472755f16
add a failing test where an immovable generator gets moved
2019-06-21 21:48:27 +02: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
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
Ralf Jung
cc328f6374
test passing invalid refs around
2018-10-23 11:20:04 +02:00
Ralf Jung
8cd73e534f
use as(_mut)_ptr on slices to entirely escape them to raw
2018-10-22 18:51:06 +02:00
Ralf Jung
26bb4f79dc
get rid of implicit Raw at bottom of stack; locals get a uniq at their bottom
2018-10-22 18:17:37 +02:00
Ralf Jung
fda03e9d7d
some more compile-fail tests
2018-10-22 16:48:10 +02:00
Ralf Jung
dd1558f337
rustc update and be very selective about what we accept on a deref
2018-10-22 16:48:09 +02:00
Ralf Jung
957d18c343
Merge remote-tracking branch 'origin/master' into rustup
2018-10-22 08:41:01 +02:00
Ralf Jung
8134918390
don't use NOTE in tests
2018-10-19 12:29:49 +02:00
Ralf Jung
b9fe91e486
fix for ptr-to-raw casts properly erasing the tag
2018-10-18 12:04:41 +02:00
Ralf Jung
1907782b64
reenable some tests that work now, and organize them better with directories
2018-10-17 16:58:54 +02:00
Ralf Jung
c9cf0344ee
enable validation for compile-fail tests, and add some new ones
2018-10-12 10:54:37 +02:00
Ralf Jung
a439262859
Merge branch 'master' into ptr-offset
2018-10-10 10:03:34 +02:00
Ralf Jung
233516b54d
Merge remote-tracking branch 'origin/master' into rustup
2018-10-10 09:07:26 +02:00
Ralf Jung
0641d5b6d3
0-offset is also not always okay
2018-10-09 20:13:46 +02:00
Ralf Jung
edf28fa227
only allow offset-by-0 on integer pointers
2018-10-09 20:13:46 +02:00
Ralf Jung
cc275c63a9
fix for fn allocations now having an alignment (1) and a size (0)
2018-10-08 13:35:54 +02:00
Ralf Jung
59eb3dbdae
use Box::into_raw
2018-10-07 10:35:34 +02:00
Ralf Jung
959693f1e5
ensure that we cannot use (wrapping_)offset to go from an int ptr to a real ptr
2018-10-06 18:32:39 +02:00
Ralf Jung
146f5d8d10
rustup; test for return type mismatch
2018-10-02 21:16:55 +02:00
Ralf Jung
e8f6973e2d
fix test for latest rustc
2018-09-29 19:39:34 +02:00
Ralf Jung
18d7394071
more compile-fail ptr equality tests, to rule out any non-determinism; and fix ptr equality to fail all of them.
...
At least these are the cases I can think of right now.
2018-09-17 10:02:31 +02:00
Ralf Jung
cd138bcd0b
test more operations on dangling ZST pointers
2018-09-17 10:02:31 +02:00
Ralf Jung
130d803b32
fix test for rustup
2018-09-17 09:18:57 +02:00
Ralf Jung
95d79cc11e
Merge remote-tracking branch 'origin/master' into zero-sized-accesses
2018-09-17 08:39:59 +02:00
Ralf Jung
95eb77c18e
add some compile-fail tests
2018-09-16 17:29:53 +02:00
Ralf Jung
1697b93ed9
Merge branch 'master' into rustup
2018-09-01 10:35:19 +02:00
Ralf Jung
f56841d974
unignore a bunch of tests that actually work
2018-08-30 15:57:17 +02:00
Ralf Jung
c44267960f
ptr equality: only defined for ptrs in the same allocation and live ptrs
2018-08-30 10:46:09 +02:00
Ralf Jung
e239fcffc1
new tests for new fn arg passing code
2018-08-30 10:42:18 +02:00
Ralf Jung
2a244dcb48
no TLS dtor and no leak checks on macOS
2018-08-30 09:41:57 +02:00
Ralf Jung
0db1c6a1b0
ignore memory leaks on Windows
2018-08-30 08:57:33 +02:00
Ralf Jung
823837922b
update for enum discriminant changes
2018-08-25 11:07:21 +02:00
Ralf Jung
bb5079b2bf
rustup
2018-08-24 19:49:57 +02:00
Ralf Jung
40cc72604a
update for bool/char being checked at binops
2018-08-24 19:18:21 +02:00
Ralf Jung
1a4ad2bb9f
update for miri engine: new function handling, new static handling, fixed leaks
2018-08-24 16:45:08 +02:00
Ralf Jung
04b925135d
fix modulo logic
2018-08-14 20:10:25 +02:00
Ralf Jung
2b40d39c1e
support computing the remainder of a ptr, if covered by alignment
2018-08-14 20:10:25 +02:00
Ralf Jung
354ec11c3e
try using types with lower alignment, maybe that helps for Windows
2018-08-14 18:52:13 +02:00
Ralf Jung
1538b36c80
make sure that StorageDead invalidates the backing store
2018-07-31 20:29:28 +02:00
Ralf Jung
b7c57fee61
Ignore tests
...
the bool thing will be fixed by the validation I have planned, and we already ignored another test around modifing constants.
2018-07-26 11:21:49 +02:00
Ralf Jung
0b8809bf5f
port some tests to check the new error format
2018-07-15 12:00:02 +02:00
Ralf Jung
30185d09f6
make sure we show error messages even when we cannot show span
2018-07-15 11:40:57 +02:00
Ralf Jung
01578ca6b3
don't run all compile-fail tests with full MIR
2018-07-12 11:02:48 +02:00
Ralf Jung
949106148c
ignore panic test on Windows
2018-07-12 10:24:25 +02:00
Ralf Jung
5f2f254695
move tests that no longer need MIR out of fullmir
2018-07-12 10:22:23 +02:00
Ralf Jung
ff5b0fee33
fix many tests and ignore some others; enable compile_fail tests again
2018-07-12 10:22:23 +02:00
bjorn3
ac25a513af
Re-enable never_transmute_humans.rs
2018-06-05 18:08:18 +02:00
bjorn3
94754de600
Convert legitimate failing errors to the new error format
2018-06-05 18:08:18 +02:00
bjorn3
8ae66db798
Convert some of the tests to the new format
2018-06-05 18:08:18 +02:00
bjorn3
569792acbc
Address some review comments
2018-06-05 18:08:18 +02:00
bjorn3
3db0568c40
Fix a couple of tests
2018-06-05 18:08:18 +02:00
Oliver Schneider
bf26b96dc7
Update to latest rustc changes
2017-12-05 17:06:03 +01:00
Oliver Schneider
4e8b9451ab
Update error messages
2017-11-27 14:31:51 +01:00
Oliver Schneider
042430270f
repeat expressions abort due to OOM instead of execution time exhaustion
2017-10-12 11:13:56 +02:00
Ralf Jung
6e8650395d
fix oom2 test
2017-09-25 16:21:20 +02:00
Ralf Jung
1ad9709e00
get rid of ad-hoc inhabitedness test
2017-09-22 13:24:55 +02:00
Ralf Jung
bc240ff606
add an undef validation test
2017-09-16 12:11:48 +02:00
Ralf Jung
2ea6663440
validation: check that int, float etc. are not undef
2017-09-16 11:45:56 +02:00
Ralf Jung
5d2ed4d2ba
Something in panic handling fails validation with full-MIR
2017-09-13 18:15:59 +02:00
Ralf Jung
c1630973d0
Disable the address-of-ZST test for now; it is buggy as it disagrees with rustc
2017-09-13 18:15:59 +02:00
Ralf Jung
bac89ae1d8
enable validation for a bunch of more tests
2017-09-13 15:46:53 +02:00
Ralf Jung
aa578de018
identify write locks by lvalues, not regions
...
This makes a new compile-fail test pass.
2017-09-13 14:37:31 +02:00
Ralf Jung
41f228824f
fix warnings in tests; update validation whitelist
2017-09-09 11:18:02 +02:00
Oliver Schneider
dd5b0100f3
Merge remote-tracking branch 'origin/master' into memory
2017-08-28 16:13:09 +02:00
Oliver Schneider
02a0f0f814
Turn off validation for some compile-fail tests
2017-08-28 15:04:32 +02:00
Ralf Jung
907d2c7310
rustc #43457 got fixed, we can enable more tests
2017-08-27 18:18:32 +02:00
Ralf Jung
8539728607
memory: make sure we check non-NULL/undef even fore 0-sized accesses
2017-08-25 14:41:59 +02:00
Ralf Jung
2fccae8aac
add another compile-fail test for validation
2017-08-18 11:30:18 +02:00
Ralf Jung
34685044f9
add a bunch of compile-fail tests for validation
2017-08-09 18:01:10 -07:00
Ralf Jung
668491a892
Work on making validation test pass again
...
Turns out that tracking write locks by their lifetime is not precise enough,
but for now, we don't have an alternative. Also, we need to force_allocate
what we acquire or else the memory will not be in the right state.
2017-08-09 15:49:47 -07:00
Ralf Jung
11f0aedc3d
add some tests making sure we get the alias checking right
2017-08-09 15:49:47 -07:00
Oliver Schneider
4ba2b82f31
Split the alloc id address space into functions and normal allocs
...
instead of interleaving them as before.
The next step is to also separate out static memory into its own
address space.
2017-08-08 17:09:25 +02:00
Ralf Jung
4957031e3c
selectively disable validation in compile-fail where appropriate. cargo test now passes :)
2017-08-03 18:13:23 -07:00
Ralf Jung
58a17026c9
Let -Zmir-emit-validate also control whether miri even acts on the validation commands
2017-08-03 18:13:23 -07:00
Oliver Schneider
adfea61665
Allow machines to create new memory kinds
2017-08-01 09:56:21 +02:00
Ralf Jung
14cb85809b
always test alignment in memory.rs
2017-07-20 13:24:06 -07:00
Eduard-Mihai Burtescu
e79bb42ab3
Merge pull request #262 from RalfJung/never
...
remove ad-hoc 'never' type check in read_lvalue
2017-07-20 15:13:21 +03:00
Ralf Jung
3b19c83c67
remove ad-hoc 'never' type check in read_lvalue
2017-07-19 20:32:51 -07:00
Ralf Jung
7648ccaae1
add test for misaligned pointer loads
2017-07-19 20:26:30 -07:00
Ralf Jung
72664e42aa
No longer check aligment and non-NULLness on &
...
This breaks creating unaligned raw pointers via `&packed.field as *const _`, which needs to be legal.
Also it doesn't seem like LLVM still relies on this, see
* https://github.com/solson/miri/issues/244#issuecomment-315563640
* https://internals.rust-lang.org/t/rules-for-alignment-and-non-nullness-of-references/5430/16
We probably want to handle this invariant like the others that validation is concerned with, and only
check it on function boundaries for now.
2017-07-19 11:28:35 -07:00
Ralf Jung
ff9192e346
remove reundant dangling checks in {r,d}eallocate
2017-07-18 13:50:54 -07:00
Oliver Schneider
2e562a4d64
Fix static mutation tests
2017-07-14 17:39:19 +02:00
Oliver Schneider
7701ff2f89
Remove duplicate test
2017-07-14 17:39:19 +02:00
Oliver Schneider
192da8819f
Ensure that it is not possible to explicitly free stack memory
2017-07-14 17:36:06 +02:00
Ralf Jung
1fe310c8ba
Memory::read_ptr has to check for relocations on the edges
2017-07-12 19:30:37 -07:00