Commit Graph

5563 Commits

Author SHA1 Message Date
Frank Steffahn
c79f6dd5a0 Fix a typo “an”→“a” 2021-08-22 18:07:01 +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
Ralf Jung
6ce77164c1 rustup 2021-07-20 12:18:59 +02:00
bors
250eff85c8 Auto merge of #1851 - RalfJung:provenance-overhaul, r=RalfJung
adjust Miri to Pointer type overhaul

This is the Miri side of https://github.com/rust-lang/rust/pull/87123.

This was a lot more work than I expected... lucky enough it is also (hopefully) the last large-scale refactoring I will do.^^

Fixes https://github.com/rust-lang/miri/issues/224
2021-07-17 19:46:33 +00:00
Ralf Jung
0d65d500c6 rustup 2021-07-17 20:24:57 +02:00
Ralf Jung
bf8b2aa8dc add test for better ptr handling in enum niches 2021-07-17 13:59:58 +02:00
Ralf Jung
a1233a721d adjust Miri to Pointer type overhaul 2021-07-16 10:10:12 +02:00
bors
a4a9a36d20 Auto merge of #1850 - RalfJung:fmt, r=RalfJung
fmt: set force_multiline_blocks=true

This is an experiment, I am not yet sure if I like it... but it does prevent rustfmt from putting stuff after the `=>` in a `match` (unless the entire arm fits there), which IMO is a big plus. What do others think?
(I also tried setting `match_arm_blocks` back to its default of `true`, but that adds too many braces for my taste.)

Btw, `@calebcartwright` is the interaction of `match_arm_blocks = false` and `force_multiline_blocks = true` as can be seen here expected? I think I like it, but it it is not at all what I expected from the docs which describe `force_multiline_blocks = true` as "Force multiline closure and match arm bodies to be wrapped in a block" -- but here that is not the effect it has, there are no new blocks being added.
2021-07-12 16:26:02 +00:00
Ralf Jung
cffa1d325c fmt cargo-miri 2021-07-11 14:27:07 +02:00
Ralf Jung
0341b8ac84 fmt: set force_multiline_blocks=true 2021-07-11 14:18:44 +02:00