-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update Miri #106121
update Miri #106121
Conversation
add graceful shim for the custom `O_TMPFILE` file opening flag plus test case I'm trying if I can get the [`tempfile`](https://crates.io/crates/tempfile) crate to work nicely with miri. Right now miri errors out due to an unsupported flag `O_TMPFILE` (= `0x410000`) passed to [`OpenOptions::custom_flags`](https://github.com/Stebalien/tempfile/blob/92ae3e9d6e82bdcfcf114be459d234d3602be2d4/src/file/imp/unix.rs#L71-L86). Interestingly, `tempfile` has a fallback in case the underlying file system does not support the `O_TMPFILE` flag, in which case `open`/`open64` is expected to return the error code `EOPNOTSUPP` (= `95`). This PR adds support for this scenario and also includes a test case (relevant [zulip](https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/miri.20and.20the.20.60tempfile.60.20crate) discussion).
Allow configurable and platform-specific page sizes This fixes rust-lang#2644 by setting platform-default page sizes along with a command line flag to override size to a specific value (e.g. in the case of aarch64 Linux on M1 silicon). There's still some code cleanup to be done and tests need to be added but I'm opening this for now.
add provenance-related test One of the cases in rust-lang/miri#2182 actually works as intended since rust-lang#104054 (or maybe even earlier); make sure we test that.
make flag checks reobust against multi-bit flags and make eval_libc functions ICE on any problem
- test that the tmpdir Miri tests see is absolute and a directory - test that current_dir returns an absolute path
make unix path handling on Windows hosts (and vice versa) preserve absoluteness Also adds a magic Miri extern function so this conversion can be invoked by the program. That avoids having to duplicate that logic.
implement minimal epoll_create1 shim Implements minimal shim for rust-lang#602
Data race spans Fixes rust-lang/miri#2205 This adds output to data race errors very similar to the spans we emit for Stacked Borrows errors. For example, from our test suite: ``` help: The Atomic Load on thread `<unnamed>` is here --> tests/fail/data_race/atomic_read_na_write_race1.rs:23:13 | 23 | ... (&*c.0).load(Ordering::SeqCst) //~ ERROR: Data race detected between Atomic Load on thread `<unnamed>` and Write o... | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: The Write on thread `<unnamed>` is here --> tests/fail/data_race/atomic_read_na_write_race1.rs:19:13 | 19 | *(c.0 as *mut usize) = 32; | ^^^^^^^^^^^^^^^^^^^^^^^^^``` ``` Because of rust-lang/miri#2647 this comes without a perf regression, according to our benchmarks.
(rustbot has picked a reviewer for you, use r? to override) |
The Miri subtree was changed cc @rust-lang/miri |
Strange, we have -D warnings in the Miri build but that lint did not fire...
|
I don't think the lint is on by default, perhaps? rustbuild turns it on for in-tree things here: https://github.com/rust-lang/rust/blob/master/src/bootstrap/builder.rs#L1666 |
Ah... So we have to keep those flags in sync with our own CI then to avoid such issues.
|
enable some warnings that rustc bootstrap enables also use cargo-install to install josh-proxy, since the docker version cannot access SSH keys (needed for pushing)
It is bold here. 🤷 |
@bors r+ p=1 |
☀️ Test successful - checks-actions |
Finished benchmarking commit (298d763): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
update Miri Noteworthy PRs: - rust-lang/miri#2357 - rust-lang/miri#2646 - rust-lang/miri#2718 - rust-lang/miri#2721 - rust-lang/miri#2725
Noteworthy PRs:
O_TMPFILE
file opening flag plus test case miri#2718