-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Make miri a subtree instead of a submodule #102028
Conversation
When cargo-miri is executed as a cargo test runner or rustdoc runtool, external tools expect what they launch as the runner/runtool to be the process actually running the test. But in the implementation, we launch the Miri interpreter as a subprocess using std::process::Command. This tends to confuse other tools (like nextest) and users (like the author). What we really want is to call POSIX exec so that the cargo-miri process becomes the interpreter. So this implements just that; we call execve via a cfg(unix) extension trait. Windows has no such mechanism, but it also doesn't have POSIX signals, which is the primary tripping hazard this change fixes.
Use real exec on cfg(unix) targets Closes rust-lang/miri#2421 The standard library has a platform extension trait that lets us get the behavior we want on cfg(unix), so why not use it? I tried this out and it produces the correct behavior in concert with nextest.
Use cargo_metadata in cargo-miri Closes rust-lang#2393 Added `cargo_metadata` to `cargo-miri` and changed metadata from manual parsing to `cargo_metadata` invocations. Thus, removed local `Metadata` struct too. Happy to fix if anything isn't right :)
Fix typo in eval.rs I just found some typos while reading the code
rustup Should work again, now that rust-lang#99984 landed.
avoid double-space in test logging
Add shim for realpath on unix Salvaged from rust-lang/miri#2294 by `@LegNeato`
Co-authored-by: Ralf Jung <post@ralfj.de>
Add `mkstemp` shim for unix
also greatly extend the 'who calls who' comment
split cargo-miri into multiple files also greatly extend the 'who calls who' comment
…ture Some crates are using nightly and failing when mapping these errors, for example <https://miri.saethlin.dev/?crate=remove_dir_all&version=0.7.0>: ``` error: unsupported operation: io error NotADirectory cannot be translated into a raw os error --> /root/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/unix/fs.rs:1203:19 ```
Add additional raw error mappings for the nightly `io_error_more` feature Some crates are using nightly and failing when mapping these errors, for example <https://miri.saethlin.dev/?crate=remove_dir_all&version=0.7.0>: ``` error: unsupported operation: io error NotADirectory cannot be translated into a raw os error --> /root/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/unix/fs.rs:1203:19 ```
avoid strerror_r failure on unknown errnum This is an informative function anyway, so as fallback just return a string with the raw errnum. Avoids panics / interpreter aborts in std on unknown errnum in from_raw_os_error.
fix an ICE in nanosleep()
and a bit of cleanup
add support for env::home_dir and a bit of cleanup
uh...?
|
Lol have we ever tried documenting miri? |
Yes, when Miri builds its docs have been available on https://doc.rust-lang.org/nightly-rustc Which is a relatively recent thing, I'm told. The docs did build a week or so ago. |
Yeah the docs currently work (well they did before the most recent toolstate breakage). We can revert #98764 for now if it helps. |
I expect raising the type length limit like it suggests would work fine too. |
This comment was marked as resolved.
This comment was marked as resolved.
(that's a very old log, the bot just a long time before posting it) |
But why would this start being a problem now? @oli-obk should we do a regular submodule update first, both to unblock the distributed Miri and to make sure that this PR is a no-op for the Miri folder (so all build failures must definitely be due to the subtree switch)? |
I just disabled the (newly enabled in this PR) check that docs actually build and we can fix them later @bors r+ |
But yes, if this one doesn't go through, let's do a submodule bump, I have enough experience manually "rebasing" (recreating) this PR now for that not to be annoying |
☀️ Test successful - checks-actions |
Finished benchmarking commit (c10f7d7): 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.
CyclesResultsThis 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.
Footnotes |
Thanks for the reminder, should get to it tomorrow |
This comment has been minimized.
This comment has been minimized.
@@ -23,3 +22,4 @@ cat /tmp/toolstate/toolstates.json | |||
python3 "$X_PY" test --stage 2 check-tools | |||
python3 "$X_PY" test --stage 2 src/tools/clippy | |||
python3 "$X_PY" test --stage 2 src/tools/rustfmt | |||
python3 "$X_PY" test --stage 2 src/tools/miri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible that this only gave us back test coverage on Linux, but not on Windows? That's a problem...
r? @RalfJung
fixes #101867
fixes #100134