Commit Graph

1595 Commits

Author SHA1 Message Date
Oli Scherer
1b7e278922 Reintroduce path filters 2022-05-27 11:43:14 +00:00
Oli Scherer
8acfbc3b33 Update all tests 2022-05-25 18:26:33 +00:00
bors
e7c2ab6d5b Auto merge of #2157 - RalfJung:tests, r=oli-obk
tweak new test suite output

- Make the entire "## Running ui tests ..." green, including the target.
- Fix double-space in `testname.rs  .. ok`.
- Make the final summary a bit more like compiletest-rs, in particular the newlines around it
- Use the term "ignored" consistently, rather than "skipped"

r? `@oli-obk`
2022-05-25 17:39:53 +00:00
Ralf Jung
a6b5b0e4ff tweak new test suite output 2022-05-25 18:27:20 +02:00
Ralf Jung
8c42ef1dee enable number validity checking and ptr::invalid checking by default 2022-05-25 16:17:41 +02:00
Oli Scherer
f1756c3ddd Add a custom ui test runner and move all tests to it 2022-05-25 13:31:26 +00:00
Ralf Jung
fcf3bc2335 with permissive-provenance set, we already treat ptr::invalid correctly 2022-05-24 17:49:11 +02:00
Ralf Jung
f0921bd5dc rustup 2022-05-23 17:35:36 +02:00
Ralf Jung
42d5e5bf96 move some tests to more suitable locations 2022-05-23 12:19:42 +02:00
bors
8f01d862d8 Auto merge of #2149 - RalfJung:tests, r=RalfJung
move some compile-fail tests to a more appropriate location

These are testing validity invariants, after all.
2022-05-23 09:43:35 +00:00
Ralf Jung
6e7a8c017a move some compile-fail tests to a more appropriate location 2022-05-23 11:28:33 +02:00
Ralf Jung
5ed22b32a2 test that compare-exchange-weak-failure-rate=0.0 means what it says 2022-05-23 10:28:46 +02:00
carbotaniuman
f7bc441fd3 Initial work on permissive provenance 2022-05-23 09:07:31 +02:00
Matthias Krüger
89da571b5d shims: fs: silence stderr instead of stdout.
Fixes #2143
2022-05-22 21:54:00 +02:00
Ben Kimock
486a769935 Handle diagnotics emitted in runtime initialization 2022-05-22 11:28:40 -04:00
Ralf Jung
8b4d613cc8 rustup 2022-05-20 18:37:57 +02:00
Ralf Jung
a941af8161 rustup 2022-05-20 08:08:11 +02:00
Ralf Jung
092c2b9d92 change one of the ref-to-uninhbaited tests to Box 2022-05-18 08:32:38 +02:00
Ralf Jung
30548bb57e test for validity of references pointing to uninhabited types 2022-05-18 08:32:38 +02:00
bors
36c274aa38 Auto merge of #2084 - rust-lang:silence, r=RalfJung
Add a command line flag to avoid printing to stdout and stderr

This is practical for tests that don't actually care about the output and thus don't want it intermingled with miri's warnings, errors or ICEs

fixes #2083
2022-05-10 07:24:07 +00:00
Ralf Jung
d585b92fe3 test for "erroneous constant used" post-monomorphization error 2022-05-08 17:56:09 +02:00
Ralf Jung
9605ae807d rustup 2022-05-06 17:28:01 +02:00
bors
49366abfb0 Auto merge of #2095 - dtolnay-contrib:ref, r=RalfJung
Replace unneeded use of `ref` in favor of "match ergonomics"

The signature of `check_shim` is very amenable to this.

```rust
fn check_shim<'a, const N: usize>(…) -> InterpResult<'tcx, &'a [OpTy<'tcx, Tag>; N]>
```

Instead of:

```rust
let &[ref ptr, ref flags] = this.check_shim(…)?;
```

we can write it just as:

```rust
let [ptr, flags] = this.check_shim(…)?;
```
2022-05-01 06:34:32 +00:00
David Tolnay
b994148714
Clean up all trailing whitespace 2022-04-30 10:40:35 -07:00
David Tolnay
1d9e91ed50
Replace unneeded use of ref in favor of "match ergonomics" 2022-04-30 10:30:05 -07:00
Ralf Jung
a0ac13d8a1 gracefully handle type-too-large layout errors 2022-04-30 17:09:44 +02:00
David Tolnay
a893618854
Implement llvm.x86.addcarry.64 2022-04-29 15:51:01 -07:00
Oli Scherer
a192a199a8 Rename flag, datastructure and messaging around muting stdout and stderr 2022-04-26 09:33:20 +00:00
Oli Scherer
4d4855c762 Add a command line flag to avoid printing to stdout and stderr 2022-04-25 13:12:55 +00:00
Ralf Jung
3ca59d2fbf make sure 2-phase borows work even with raw ptr tagging 2022-04-21 16:09:35 +02:00
Ralf Jung
432015d1f6 rustup 2022-04-20 17:46:31 -04:00
Ralf Jung
e214e6db98 add mut_below_shr test 2022-04-20 10:52:25 -04:00
Ralf Jung
d4a85f6305 add another test for #2068 2022-04-20 10:39:17 -04:00
Ralf Jung
b5a76c7ff0 add test for https://github.com/rust-lang/miri/issues/2068 2022-04-20 08:44:10 -04:00
Ralf Jung
763ff1c49f do not consider thread-local allocations read-only 2022-04-19 14:56:07 -04:00
Ralf Jung
db2c4b6dfa implement strerror_r 2022-04-16 22:54:38 -04:00
Ralf Jung
0669b22759 rustup 2022-04-16 08:41:34 -04:00
Ralf Jung
3f1d3aedcd increase slack for timeout test 2022-04-10 11:23:56 -04:00
Ralf Jung
ebb70da4c6 rustup 2022-04-10 09:36:30 -04:00
bors
be72564a64 Auto merge of #2055 - RalfJung:rustup, r=RalfJung
Rustup

Fixes https://github.com/rust-lang/miri/issues/1717
2022-04-08 13:57:45 +00:00
Ralf Jung
363f8ab745 thread name setting works with strict provenance now :) 2022-04-08 09:57:25 -04:00
Ralf Jung
c8553d8162 fix Windows stdout/stderr 2022-04-08 09:57:25 -04:00
Ralf Jung
cac48dd734 treat prctl like a variadic function 2022-04-07 16:20:19 -04:00
Ralf Jung
59ee672fef for variadic functions, accept arbitrary trailing arguments but make sure we check all leading arguments 2022-04-07 16:19:00 -04:00
Mara Bos
5581e33806 Add test for FUTEX_*_BITSET. 2022-04-06 23:48:26 +02:00
Mara Bos
a72a929b19 Add test for FUTEX_WAIT_BITSET. 2022-04-06 23:06:27 +02:00
Ralf Jung
46ff257b4e test that partially uninit MaybeUninit works correctly 2022-04-05 18:30:39 -04:00
Ralf Jung
3dcba56349 add test for nasty example 2022-04-02 00:05:27 -04:00
Ralf Jung
1d79b60a1e make strict-provenance imply check-number-validity 2022-04-01 23:59:16 -04:00
bors
732461b4cd Auto merge of #2045 - RalfJung:strict-provenance, r=RalfJung
add -Zmiri-strict-provenance

This implements [strict provenance](https://github.com/rust-lang/rust/issues/95228) in Miri. The only change is that casting an integer to a pointer does not even attempt to produce a good provenance for the given address; instead, it always uses the invalid provenance. This stricter than even `-Zmiri-tag-raw-pointers` in that it also rejects the following example (which does not even involve Stacked Borrows):
```rust
fn main() {
    let x = 22;
    let ptr = &x as *const _ as *const u8;
    let roundtrip = ptr as usize as *const u8;
    let _ = unsafe { roundtrip.offset(1) };
}
```
The new flag also implies `-Zmiri-tag-raw-pointers` since the only reason one would *not* want to tag raw pointers is to support ptr-int-ptr roundtrips.

Note that the flag does *not* check against ptr-to-int *transmutes*; that still requires `-Zmiri-check-number-validity`. You can also check for strict provenance *without* Stacked Borrows by adding `-Zmiri-disable-stacked-borrows`.

The new "Miri hard mode" flags for maximal checking are `-Zmiri-strict-provenance -Zmiri-check-number-validity`. (Add `-Zmiri-symbolic-alignment-check` if you feel extra spicy today.)
2022-04-01 22:40:26 +00:00