bors [Fri, 24 Jun 2022 23:24:57 +0000 (23:24 +0000)]
Auto merge of #2263 - wesleywiser:update_measureme, r=RalfJung
Update measureme to the latest version
The major version number is different due to changes to the on-disk recording format but the core API is the same and miri continues to build on the latest version.
bors [Thu, 23 Jun 2022 18:53:37 +0000 (18:53 +0000)]
Auto merge of #2261 - RalfJung:fmt, r=oli-obk
make rustfmt mandatory and used pinned toolchain
Looks like this is what most people prefer/expect, and using a pinned toolchain for formatting avoids some (rare and so far mostly hypothetical) formatting inconsistency issues.
bors [Wed, 22 Jun 2022 10:04:08 +0000 (10:04 +0000)]
Auto merge of #2255 - dtolnay-contrib:rustfmt7, r=oli-obk
Format tests with rustfmt (288-299 of 299)
Extracted from #2097.
I'll make a separate PR to enable checking the `tests` directory's formatting in CI. I'll need to rebase that after both this and #2254 have landed, and if any new non-rustfmt-formatted files appear in the meantime, we can include formatting those in the same PR that enables the CI.
bors [Wed, 22 Jun 2022 09:04:44 +0000 (09:04 +0000)]
Auto merge of #2252 - dtolnay-contrib:rustfmt5, r=oli-obk
Format tests with rustfmt (225-275 of 300)
Extracted from #2097.
These cases all involve a line comment at the end of a block that rustfmt has chosen to wrap.
```diff
- unsafe { (*ptr).set(20); } //~ ERROR does not exist in the borrow stack
+ unsafe {
+ (*ptr).set(20);
+ } //~ ERROR does not exist in the borrow stack
```
I have moved all of those comments back onto the same line as the content of the block instead, as was indicated being `@RalfJung's` preference in https://github.com/rust-lang/miri/pull/2097#discussion_r862436672.
```diff
+ unsafe {
+ (*ptr).set(20); //~ ERROR does not exist in the borrow stack
+ }
```
bors [Tue, 21 Jun 2022 07:39:16 +0000 (07:39 +0000)]
Auto merge of #2249 - dtolnay-contrib:rustfmt3, r=oli-obk
Format tests with rustfmt (151-200 of 300)
Extracted from #2097.
This PR is still only doing the easy cases with no comments involved.
In the next PRs after this, I'll start grouping by common comment patterns, e.g. all the cases resembling https://github.com/rust-lang/miri/pull/2097#discussion_r862436672 together in one PR.
bors [Tue, 21 Jun 2022 02:51:35 +0000 (02:51 +0000)]
Auto merge of #2244 - dtolnay-contrib:rustfmt0, r=RalfJung
Format tests and benches with rustfmt (1-50 of 300)
Extracted from #2097.
I filtered this PR to contain exclusively "easy" cases to start off with, i.e. where there is no compiletest_rs (or other) comment in the vicinity that might need to get manually repositioned.
bors [Mon, 20 Jun 2022 05:23:46 +0000 (05:23 +0000)]
Auto merge of #2242 - dtolnay-contrib:rustfmtskip, r=RalfJung
Add rustfmt::skip to some files
Extracted from https://github.com/rust-lang/miri/pull/2097.
Five of the files being skipped here are because rustfmt is buggy (https://github.com/rust-lang/rustfmt/issues/5391; see the error messages below). The other two have clearly preferable manual formatting.
David Tolnay [Sat, 30 Apr 2022 18:07:36 +0000 (11:07 -0700)]
Add rustfmt::skip to some files
Five of the files being skipped here are because rustfmt is buggy (see
the error messages below). The others have clearly preferable manual
formatting.
bors [Sat, 18 Jun 2022 15:10:56 +0000 (15:10 +0000)]
Auto merge of #2228 - cbeuw:futex-fix, r=RalfJung
Prevent futex_wait from actually waiting if a concurrent waker was executed before us
Fixes #2223
Two SC fences were placed in `futex_wake` (after the caller has changed `addr`), and in `futex_wait` (before we read `addr`). This guarantees that `futex_wait` sees the value written to `addr` before the last `futex_wake` call, should one exists, and avoid going into sleep with no one else to wake us up.
https://github.com/rust-lang/miri/blob/ada7b72a879d79aaa06f0a2a95edd520615da1a2/src/concurrency/weak_memory.rs#L324-L326
Earlier I proposed to use `fetch_add(0)` to read the latest value in MO, though this isn't the proper way to do it and breaks aliasing: syscall caller may pass in a `*const` from a `&` and Miri complains about write to a `SharedReadOnly` location, causing this test to fail.
https://github.com/rust-lang/miri/blob/ada7b72a879d79aaa06f0a2a95edd520615da1a2/tests/pass/concurrency/linux-futex.rs#L56-L68
bors [Mon, 13 Jun 2022 16:08:54 +0000 (16:08 +0000)]
Auto merge of #2207 - RalfJung:ui_test_parallelism, r=oli-obk
ui_test: ensure all worker threads stay around
Also organize files such that the by far slowest test (weak_memory/consistency) always starts first. It still finishes last on my system... even after I halved the iteration count.