Commit Graph

5821 Commits

Author SHA1 Message Date
hyd-dev
7301fe118a
Move #[allow(unreachable_code)] in tests/run-pass/generator.rs 2021-08-26 16:16:43 +08:00
Oli Scherer
450e110b50 Try out gitpod 2021-08-24 15:03:36 +00:00
bors
08ca5606ab Auto merge of #1877 - hyd-dev:rustup, r=RalfJung
Add `#[allow(unreachable_code)]` to `drop(x)` in `tests/run-pass/generator.rs`

The test [starts to trigger this warning](https://github.com/rust-lang/miri/runs/3408355084?check_suite_focus=true#step:8:264) (I guess it's caused by rust-lang/rust#85556). The warning seems correct, but the unreachable code in that test also seems reasonable.
2021-08-24 12:39:59 +00:00
hyd-dev
33a67c6b33
Add #[allow(unreachable_code)] to drop(x) in tests/run-pass/generator.rs 2021-08-24 18:50:41 +08:00
bors
94ae910131 Auto merge of #1875 - niluxv:volatile_set_memory_intrinsic, r=RalfJung
Add support for the `volatile_set_memory` intrinsic

Add support for the unstable `volatile_set_memory` intrinsic

(Runtime behaviour and soundness requirements for `volatile_set_memory` are identical to those of `write_bytes`, so supporting this intrinsic is trivial.)
2021-08-23 10:55:48 +00:00
niluxv
083e5e604c Add test for volatile_set_memory 2021-08-23 12:42:13 +02:00
bors
7ec2bee723 Auto merge of #1874 - steffahn:a_an, r=RalfJung
Fix typos “a”→“an”

See rust-lang/rust#88230
2021-08-22 16:31:12 +00:00
Frank Steffahn
c79f6dd5a0 Fix a typo “an”→“a” 2021-08-22 18:07:01 +02:00
niluxv
32c2df87be Add support for the volatile_set_memory intrinsic
Runtime behaviour and soundness requirements are identical to `write_bytes`.
2021-08-22 17:48:31 +02:00
Frank Steffahn
a0d4372ff9 Fix typos “a”→“an” 2021-08-22 16:42:23 +02:00
bors
19691b2de8 Auto merge of #1872 - RalfJung:rustup, r=RalfJung
rustup
2021-08-16 15:35:14 +00:00
Ralf Jung
2c14bab76f llvm_asm → asm 2021-08-16 17:34:48 +02:00
Ralf Jung
9a6a5119fc rustup 2021-08-16 17:09:21 +02:00
bors
e8ac524a30 Auto merge of #1871 - hyd-dev:no-mangle-method, r=RalfJung
Update tests for `#[no_mangle]` on associated functions

https://github.com/rust-lang/rust/pull/86492 has landed:
- The code in https://github.com/rust-lang/miri/issues/1837 starts to work (even without `AssocFn::foo();` at line 12) in Miri.
- `pub` is not necessary for `#[no_mangle]` associated functions in `test-cargo-miri/exported-symbol-dep/src/lib.rs` anymore.

Closes https://github.com/rust-lang/miri/issues/1837.
2021-08-15 11:41:00 +00:00
hyd-dev
838ed1d754
Update tests for #[no_mangle] associated functions 2021-08-15 17:21:33 +08:00
bors
13fae3d074 Auto merge of #1870 - RalfJung:rustup, r=RalfJung
rustup

Cc https://github.com/rust-lang/rust/issues/88016
2021-08-14 12:49:46 +00:00
Ralf Jung
78b4c7bf79 rustup 2021-08-14 14:47:57 +02:00
bors
042cbf175b Auto merge of #1868 - hyd-dev:rustup, r=RalfJung
Fix tests for `C-unwind` ABI changes

cc https://github.com/rust-lang/rust/issues/87778
2021-08-07 13:16:22 +00:00
bors
d3157def75 Auto merge of #1865 - rust-lang:test-cargo-miri, r=RalfJung
improve test-cargo-miri output
2021-08-07 12:55:06 +00:00
hyd-dev
af7eb369b1
Fix tests for C-unwind ABI changes 2021-08-07 15:57:54 +08:00
Ralf Jung
d12d4050ae improve test-cargo-miri output 2021-08-04 11:25:33 +02:00
bors
3ca53e0307 Auto merge of #1864 - hyd-dev:rustup, r=RalfJung
Update cargo-miri test

The doctest output was [changed](https://github.com/rust-lang/miri/runs/3238758260?check_suite_focus=true#step:8:1263) (probably by https://github.com/rust-lang/cargo/pull/9730). Update `test-cargo-miri/test.default.stdout.ref` to match the new output.
2021-08-04 09:25:18 +00:00
hyd-dev
dced6b8518
Update cargo-miri test 2021-08-04 16:46:11 +08:00
bors
99ec9c1707 Auto merge of #1854 - RalfJung:partial-ptr-overwrite, r=RalfJung
adjust for ERR_ON_PARTIAL_PTR_OVERWRITE

The Miri side of https://github.com/rust-lang/rust/pull/87248
2021-08-02 16:00:43 +00:00
Ralf Jung
3a922286e3 rustup 2021-08-02 17:59:48 +02:00
Ralf Jung
257e9cef66 docify some comments 2021-08-02 17:58:55 +02:00
Ralf Jung
5338a16018 adjust for ERR_ON_PARTIAL_PTR_OVERWRITE 2021-08-02 17:58:55 +02:00
bors
1f969da570 Auto merge of #1863 - hyd-dev:parallel-compiler, r=RalfJung
Use `Lrc` instead of `Rc` in `MiriCompilerCalls::config()`

The `used_crate_source` query defines its return type as [`Lrc<CrateSource>`](1195bea5a7/compiler/rustc_middle/src/query/mod.rs (L1418)), which would be `Arc` when `parallel-compiler = true`.

I assume this fixes rust-lang/rust#87623. I didn't test that locally -- I'm not interested in `parallel-compiler = true` enough to be willing to recompile rustc with that configuration to test it, but I'm submitting this in case it might be useful for `parallel-compiler = true` users.
2021-07-30 14:38:10 +00:00
hyd-dev
a789b49e4c
Use Lrc instead of Rc in MiriCompilerCalls::config() 2021-07-30 21:28:34 +08:00
bors
453e3ef7da Auto merge of #1861 - RalfJung:rustup, r=RalfJung
rustup

Cc https://github.com/rust-lang/rust/issues/87518
2021-07-27 16:39:12 +00:00
Ralf Jung
c76fa2138e rustup 2021-07-27 18:38:35 +02:00
bors
02f78b089c Auto merge of #1858 - RalfJung:thread-leaks, r=oli-obk
also ignore 'thread leaks' with -Zmiri-ignore-leaks

This is a step towards https://github.com/rust-lang/miri/issues/1371. The remaining hard part would be supporting checking for memory leaks when there are threads still running. For now we elegantly avoid this problem by using the same flag to control both of these checks. :)
2021-07-27 12:23:56 +00:00
Ralf Jung
78bcd12b17 make sure we only terminate main thread once TLS is initialized 2021-07-27 14:05:37 +02:00
Ralf Jung
66aa3d0247 make the loop infinite 2021-07-27 13:58:55 +02:00
Ralf Jung
679d10f98b no concurrency on windows 2021-07-25 14:38:02 +02:00
bors
e445f78951 Auto merge of #1859 - RalfJung:global-system-mixup, r=RalfJung
add test for mixing up System and Global memory
2021-07-25 12:37:03 +00:00
Ralf Jung
24fa9deddc add test for mixing up System and Global memory 2021-07-25 14:36:00 +02:00
Ralf Jung
df9d481989 tell users how to disable the leak check 2021-07-25 14:21:06 +02:00
Ralf Jung
71efd950d1 also ignore 'thread leaks' with -Zmiri-ignore-leaks 2021-07-25 14:21:06 +02:00
bors
eb9e3073a0 Auto merge of #1856 - RalfJung:no-mir, r=RalfJung
show proper error when using a sysroot without MIR

Fixes https://github.com/rust-lang/miri/issues/1834
2021-07-25 09:50:06 +00:00
bors
1677946d74 Auto merge of #1838 - atsmtat:fs-isolation, r=RalfJung
Fix use of deprecated `check_no_isolation` in posix fs shims

Update posix fs shims to use new API `reject_in_isolation`, which
allows rejection with error code instead of always forcing abort.
Error code chosen for each op is the most appropriate one from the
list in corresponding syscall's manual.

Updated helper APIs to not use quotes (\`) around input name while
preparing the message. This allows callers to pass multi-word string
like -- "\`read\` from stdin".

Cc https://github.com/rust-lang/miri/issues/1034
2021-07-25 09:34:02 +00:00
Smit Soni
20d0f2ee26 Move shim argument checks before isolation check
This allows catching extremely incorrect arguments before rejecting
due to isolation.
2021-07-24 11:54:55 -07:00
Ralf Jung
46d31f9230 show proper error when using a sysroot without MIR 2021-07-24 14:02:09 +02:00
Smit Soni
da6880427a Update error code for fs ops in isolation
Change the code to either `EACCES` (if the op is performed on the
path), or `EBADF` (if the op is performed the fd)

Updated ops: `stat`, `opendir`, `ftruncate64`, and `readlink`

Add a new test for fs ops in isolation.
2021-07-20 08:23:51 -07:00
Smit Soni
a1cabac727 Fix use of deprecated check_no_isolation in posix fs ops
Update posix fs shims to use new API `reject_in_isolation`, which
allows rejection with error code instead of always forcing abort.
Error code chosen for each op is the most appropriate one from the
list in corresponding syscall's manual.

Updated helper APIs to not use quotes (`) around input name while
preparing the message. This allows callers to pass multi-word string
like -- "`read` from stdin".
2021-07-20 08:23:51 -07:00
bors
e2872a3f2a Auto merge of #1853 - RalfJung:negative-offsets, r=RalfJung
better errors for negative out-of-bounds offsets

This is the Miri side of https://github.com/rust-lang/rust/pull/87224
2021-07-20 11:39:12 +00:00
Ralf Jung
63286771d3 rustup 2021-07-20 13:38:52 +02:00
Ralf Jung
cf26458376 test for negative offsets 2021-07-20 13:30:49 +02:00
Ralf Jung
46ed39ec20 adjust for PointerOutOfBounds change 2021-07-20 13:30:49 +02:00
bors
37974e617e Auto merge of #1855 - RalfJung:rustup, r=RalfJung
rustup

This test was removed in rustc in https://github.com/rust-lang/rust/pull/87141.

We added it in https://github.com/rust-lang/miri/pull/1430, and possibly that "interesting case in unsizing" is not covered by tests now -- but I don't remember what that case is.^^ If/when `impl Trait` in bindings comes back, we should copy the new rustc tests to Miri as well.
2021-07-20 10:21:08 +00:00