Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
1ea503d
Prepare for merging from rust-lang/rust
workflows-miri[bot] Nov 10, 2026
be6f854
Merge ref 'ac8310ba643a' from rust-lang/rust
workflows-miri[bot] Nov 10, 2026
5aefb50
windows SetFileInformationByHandle: use stream_len to get current fil…
RalfJung Nov 10, 2026
e142b37
Merge pull request #5607 from rust-lang/rustup-2026-11-10
RalfJung Nov 10, 2026
ab74d54
Merge pull request #5608 from RalfJung/win-SetFileInformationByHandle
RalfJung Nov 10, 2026
0df5544
Rename `this` to `ecx` in shared socket code
WhySoBad Nov 9, 2026
9c41b09
Rename `this` to `ecx` in socket address shim
WhySoBad Nov 9, 2026
a8edb52
Rename `this` to `ecx` in TCP socket shim
WhySoBad Nov 9, 2026
f34c014
Rename `this` to `ecx` in virtual socket shim
WhySoBad Nov 9, 2026
8afbd0f
Merge pull request #5606 from WhySoBad/socket-this-to-ecx
RalfJung Nov 10, 2026
adaa069
rename this -> ecx in sse41, sse42 intrinsics and time shims
programskillforverification Nov 10, 2026
4d5dd2c
Merge pull request #5610 from programskillforverification/this-to-ecx-4
RalfJung Nov 10, 2026
a8eef01
update triagebot config
RalfJung Nov 10, 2026
41c2b0c
Merge pull request #5612 from RalfJung/triagebot
RalfJung Nov 10, 2026
14e5bd7
rename this -> ecx in poll, sync, thread unix shims and unwind shims
Enfey Nov 10, 2026
0160fd6
Prepare for merging from rust-lang/rust
workflows-miri[bot] Nov 11, 2026
915c8c1
Merge ref '9c5648833e5c' from rust-lang/rust
workflows-miri[bot] Nov 11, 2026
d1c1e29
Merge pull request #5613 from Enfey/rename-this-to-ecx-shims
RalfJung Nov 11, 2026
9eb356b
bless priroda tests
RalfJung Nov 11, 2026
3e91a2c
Merge pull request #5614 from rust-lang/rustup-2026-11-11
RalfJung Nov 11, 2026
e8e856e
Add libc direct tests for unlink and symlink
mehmettoplu-rs Nov 7, 2026
6a8c605
slightly extend test
RalfJung Nov 11, 2026
28b06a6
allow more slack in macos semaphore timeout test
RalfJung Nov 11, 2026
9406beb
Merge pull request #5584 from mehmettoplu-rs/test-unlink-symlink
RalfJung Nov 11, 2026
dc58d21
Add libc direct tests for pthread_atfork and sched_yield
mehmettoplu-rs Nov 11, 2026
2e73ebb
Prepare for merging from rust-lang/rust
workflows-miri[bot] Nov 13, 2026
aea078f
Merge ref '8eb778d04094' from rust-lang/rust
workflows-miri[bot] Nov 13, 2026
94ce7d2
fix lockfile workaround when min-publish-age is set
RalfJung Nov 13, 2026
0a4afdd
bless priroda
RalfJung Nov 13, 2026
417a15d
Merge pull request #5622 from rust-lang/rustup-2026-11-13
RalfJung Nov 13, 2026
ec3d5c5
Merge pull request #5616 from mehmettoplu-rs/test-sched-yield-pthread…
RalfJung Nov 15, 2026
dd95c16
some more this -> ecx
RalfJung Nov 15, 2026
fbb781c
Merge pull request #5627 from RalfJung/ecx
RalfJung Nov 15, 2026
f394280
NULL-terminate argv and add direct tests for _NSGetArgc and _NSGetArgv
mehmettoplu-rs Nov 13, 2026
b6255ac
Extend miri_start_with_std test to check argv[argc] is null
mehmettoplu-rs Nov 15, 2026
39e3586
tweak test
RalfJung Nov 15, 2026
49bc5f3
Merge pull request #5624 from mehmettoplu-rs/argv-null-terminator
RalfJung Nov 15, 2026
7a0aab9
Use symbolic alignment checking in the allocator tests
saethlin Nov 13, 2026
0e902ad
Merge pull request #5625 from saethlin/windows-allocator-symbolic-ali…
saethlin Nov 15, 2026
52ba0a8
Add non-blocking `write` and `send` support for UDP sockets
WhySoBad Oct 19, 2026
3cdd90b
Add non-blocking `read` and `recv` support for UDP sockets, add I/O t…
WhySoBad Oct 19, 2026
5a852b5
Rename `make_listener` libc helper to `make_tcp_listener`
WhySoBad Nov 2, 2026
374819d
Fix x86 dot-product reduction order and signed zero
Kaileshwar16 Nov 10, 2026
14ef98d
Merge pull request #5609 from Kaileshwar16/issue-5599-dot-product
RalfJung Nov 16, 2026
a150369
implement unlinkat to support fs::remove_dir_all
programskillforverification Nov 11, 2026
1a1e3ce
Add libc direct test for abort
mehmettoplu-rs Nov 16, 2026
7078a59
Prepare for merging from rust-lang/rust
workflows-miri[bot] Nov 17, 2026
370e5c8
Merge ref '5df8c02afdf6' from rust-lang/rust
workflows-miri[bot] Nov 17, 2026
b39cd33
Merge pull request #5636 from rust-lang/rustup-2026-11-17
RalfJung Nov 17, 2026
0510b1f
Merge pull request #5414 from programskillforverification/unix-unlinkat
RalfJung Nov 17, 2026
37288a4
triagebot: enable merge command
RalfJung Nov 17, 2026
9607ce1
minor tweaks
RalfJung Nov 17, 2026
e3f9e04
Merge pull request #5637 from RalfJung/triagebot
RalfJung Nov 17, 2026
9fbdb74
Merge pull request #5634 from mehmettoplu-rs/test-abort
RalfJung Nov 17, 2026
67c45b2
Merge pull request #5507 from WhySoBad/udp-non-blocking-io
RalfJung Nov 17, 2026
94c2406
Test GetCurrentProcessId and _NSGetEnviron directly
Kaileshwar16 Nov 10, 2026
0bc008a
track pthread_attr_t stack size and fail pthread_create for huge stacks
programskillforverification Nov 9, 2026
119733c
tweak thread_stack_size_ok
RalfJung Nov 17, 2026
fe2968c
Merge pull request #5601 from programskillforverification/pthread-att…
rustbot Nov 17, 2026
27c1921
miri: use wrapping multiplication when computing element addresses fo…
eduardosm Nov 17, 2026
d6eb2b5
Merge pull request #5639 from eduardosm/gather-failure
RalfJung Nov 17, 2026
68906fb
windows tests: print_safe should not be needed
RalfJung Nov 17, 2026
ad25332
Merge pull request #5640 from RalfJung/win-print
RalfJung Nov 17, 2026
218e753
portable-sim tests: ensure that float ops are non-deterministic
RalfJung Nov 17, 2026
3bf85fe
[Priroda] Normalize MIR local IDs in UI test output
moabo3li Nov 17, 2026
692201e
[Priroda] Stop asserting unnamed dead MIR locals in the UI output
moabo3li Nov 17, 2026
da58a61
[Priroda] Document what the locals command lists
moabo3li Nov 17, 2026
7565191
move windows tests to their own folder
RalfJung Nov 17, 2026
43a20d3
Merge pull request #5643 from RalfJung/simd-float-nondet
RalfJung Nov 17, 2026
3a842be
Merge pull request #5626 from Kaileshwar16/test/3179-direct-win-macos…
RalfJung Nov 17, 2026
dee9bd8
Prepare for merging from rust-lang/rust
RalfJung Nov 17, 2026
7c09ebf
Merge ref '59cbdee2e7b3' from rust-lang/rust
RalfJung Nov 17, 2026
afc1997
add #[optimize] attribute tests
RalfJung Nov 17, 2026
6c3be76
Merge pull request #5644 from RalfJung/opt-attr
RalfJung Nov 17, 2026
a1ce554
[Priroda] Normalize standard-library paths in UI fixtures
moabo3li Nov 17, 2026
5ffc473
Prepare for merging from rust-lang/rust
workflows-miri[bot] Nov 18, 2026
0b09fbc
Merge ref 'ac7bce927202' from rust-lang/rust
workflows-miri[bot] Nov 18, 2026
828c560
fix genmc build
RalfJung Nov 18, 2026
5bc8443
do not mix backend and rust intrinsics
RalfJung Nov 18, 2026
239c8bf
Merge pull request #5647 from rust-lang/rustup-2026-11-18
RalfJung Nov 18, 2026
dc272b3
Test SYS_accept4 directly on Linux
Kaileshwar16 Nov 18, 2026
d6c7b46
make MetaObj opaque by default
RalfJung Nov 18, 2026
1fd2f0b
Merge pull request #5650 from RalfJung/meta-opaque
RalfJung Nov 18, 2026
e9dd805
Add `r? @ghost` for Josh push PRs
Kobzol Nov 18, 2026
8ca417b
Merge pull request #5653 from Kobzol/josh-push-msg
RalfJung Nov 18, 2026
eea8bf0
Test accept4 syscall and libc accept through shared cases
Kaileshwar16 Nov 19, 2026
6dfbd68
Implement mkdirat for Dir::create_dir
mehmettoplu-rs Nov 19, 2026
f96baed
fix asin value range
RalfJung Nov 19, 2026
cbfed63
fix atan2 NAN handling
RalfJung Nov 19, 2026
bab3e77
Merge pull request #5659 from RalfJung/asin
RalfJung Nov 19, 2026
d025ca0
Add avx512 shift intrinsics
TDecking Nov 19, 2026
354004b
Merge pull request #5651 from TDecking/avx512
rustbot Nov 19, 2026
e86400c
Test append mode with seek and reads
darkraider01 Nov 16, 2026
0a2a775
dont run broken seek-based emulation of pwrite for O_APPEND files
RalfJung Nov 19, 2026
72b2f56
Add support for blocking `send` to UDP socket shim
WhySoBad Nov 10, 2026
753d084
Add support for blocking `recv` to UDP socket shim, add blocking I/O …
WhySoBad Nov 12, 2026
5b0c763
Merge pull request #5635 from darkraider01/rename-shims-ecx
rustbot Nov 19, 2026
eef56f9
shims/fs tests: also test append mode
RalfJung Nov 19, 2026
748ab15
windows: test creating without writing, and dont falsely set append flag
RalfJung Nov 19, 2026
7c89832
migrate Windows API tests to windows-sys
programskillforverification Nov 20, 2026
08fd6cc
Merge pull request #5655 from programskillforverification/migrate-win…
rustbot Nov 20, 2026
b286dd4
windows/fs: ensure bad read/write requests get rejected
RalfJung Nov 19, 2026
6c60271
libc/fs: test and fix O_CREAT on read-only open
RalfJung Nov 19, 2026
1b58c16
Merge pull request #5646 from moabo3li/priroda-local-id-normalization
oli-obk Nov 20, 2026
d7b3011
Merge pull request #5660 from RalfJung/test-append
RalfJung Nov 20, 2026
042d32c
Merge pull request #5638 from WhySoBad/udp-blocking-io
rustbot Nov 20, 2026
3e9646b
inline the parts of rustc_tools_util that we use
RalfJung Nov 20, 2026
d54e23b
rename env vars for more consistency
RalfJung Nov 20, 2026
3f47dc0
Merge pull request #5664 from RalfJung/rustc_tools_util
RalfJung Nov 20, 2026
060746c
Share the implementation of mkdirat with mkdir
mehmettoplu-rs Nov 20, 2026
9457684
Reject non-default modes in mkdir and mkdirat on non-Unix hosts
mehmettoplu-rs Nov 20, 2026
fb8daf9
minor tweaks
RalfJung Nov 21, 2026
ad44765
all syscalls seem to have tests now
RalfJung Nov 21, 2026
3a25a8c
Merge pull request #5649 from Kaileshwar16/test/3179-direct-sys-accept4
rustbot Nov 21, 2026
de01d5e
Merge pull request #5658 from mehmettoplu-rs/mkdirat
rustbot Nov 21, 2026
81961a1
floats test: add missing f128 FIXMEs
RalfJung Nov 21, 2026
1e5a59e
add read_int helper and use it to simplify some code in time, fs, soc…
RalfJung Nov 21, 2026
e991f56
clean up remaining to_(u)int
RalfJung Nov 21, 2026
583bea8
use write_int where appropriate
RalfJung Nov 21, 2026
b833c1f
addrinfo: propagate type information through shim
RalfJung Nov 21, 2026
86cf36e
Merge pull request #5667 from RalfJung/read_int
RalfJung Nov 21, 2026
ee4ff22
update lockfile
RalfJung Nov 20, 2026
6e8d3ad
enable more std tests in Miri :)
RalfJung Nov 20, 2026
f73aba8
dont try mutating the original working directory
RalfJung Nov 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@ dependencies = [
"cargo_metadata 0.23.1",
"directories",
"rustc-build-sysroot",
"rustc_tools_util 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_version",
"serde",
"serde_json",
Expand Down Expand Up @@ -667,7 +666,7 @@ dependencies = [
"itertools",
"pulldown-cmark",
"regex",
"rustc_tools_util 0.4.2",
"rustc_tools_util",
"serde",
"serde_json",
"tempfile",
Expand Down Expand Up @@ -4951,12 +4950,6 @@ dependencies = [
name = "rustc_tools_util"
version = "0.4.2"

[[package]]
name = "rustc_tools_util"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3b75158011a63889ba12084cf1224baad7bcad50f6ee7c842f772b74aa148ed"

[[package]]
name = "rustc_trait_selection"
version = "0.0.0"
Expand Down
4 changes: 3 additions & 1 deletion library/std/src/net/udp/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg(not(skip_unsupported_miri_tests))] // UDP sockets are not supported in Miri
#![cfg(not(all(windows, skip_unsupported_miri_tests)))] // Miri has no net support on Windows

use crate::io::ErrorKind;
use crate::net::tests::{LOCALHOST_IP4, LOCALHOST_IP6, compare_ignore_zoneid};
Expand Down Expand Up @@ -357,6 +357,7 @@ fn ttl() {

#[test]
#[cfg(any(target_family = "unix", target_os = "windows"))]
#[cfg(not(skip_unsupported_miri_tests))] // socket flag not supported by Miri
fn hop_limit() {
let hlim = 100;

Expand Down Expand Up @@ -392,6 +393,7 @@ fn set_nonblocking() {
// and must be rejected rather than truncated.
#[test]
#[cfg(all(target_pointer_width = "64", unix))]
#[cfg(not(skip_unsupported_miri_tests))] // read-only mmap not supported by Miri
fn send_datagram_larger_than_c_int_max() {
// A read-only anonymous mapping rather than a 2 GiB `Vec`: the datagram is
// rejected before the kernel ever reads the pages, so this costs no
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/thread/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,6 @@ fn test_minimal_thread_stack() {
// Test that a stack size too large to round up to the page size is an error.
// The cfg mirrors the one around the rounding in the unix `Thread::new`.
#[cfg(all(unix, not(any(target_os = "espidf", target_os = "nuttx"))))]
// FIXME(https://github.com/rust-lang/miri/issues/5594): Miri ignores the requested stack size.
#[cfg_attr(skip_unsupported_miri_tests, ignore)]
#[test]
fn test_huge_thread_stack() {
let builder = thread::Builder::new().stack_size(usize::MAX);
Expand Down
7 changes: 0 additions & 7 deletions src/tools/miri/cargo-miri/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ dependencies = [
"cargo_metadata",
"directories",
"rustc-build-sysroot",
"rustc_tools_util",
"rustc_version",
"serde",
"serde_json",
Expand Down Expand Up @@ -228,12 +227,6 @@ dependencies = [
"walkdir",
]

[[package]]
name = "rustc_tools_util"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3b75158011a63889ba12084cf1224baad7bcad50f6ee7c842f772b74aa148ed"

[[package]]
name = "rustc_version"
version = "0.4.1"
Expand Down
3 changes: 0 additions & 3 deletions src/tools/miri/cargo-miri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,3 @@ rustc-build-sysroot = "0.5.13"
# do not. This makes `./miri install` after `./miri build` faster.
# Require a version of serde without intransparent unreproducible binary blobs.
serde = { version = "1.0.185", features = ["derive"] }

[build-dependencies]
rustc_tools_util = "0.4"
58 changes: 57 additions & 1 deletion src/tools/miri/cargo-miri/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,62 @@
use std::path::PathBuf;
use std::process::Command;
use std::str;

#[must_use]
fn get_output(cmd: &str, args: &[&str]) -> Option<String> {
let output = Command::new(cmd).args(args).output().ok()?;
let mut stdout = output.status.success().then_some(output.stdout)?;
// Remove trailing newlines.
while stdout.last().copied() == Some(b'\n') {
stdout.pop();
}
String::from_utf8(stdout).ok()
}

#[must_use]
pub fn rerun_if_git_changes() -> Option<()> {
// Make sure we get rerun when the git commit changes.
// We want to watch two files: HEAD, which tracks which branch we are on,
// and the file for that branch that tracks which commit is checked out.

// First, find the `HEAD` file. This should work even with worktrees.
let git_head_file = PathBuf::from(get_output("git", &["rev-parse", "--git-path", "HEAD"])?);
if git_head_file.exists() {
println!("cargo::rerun-if-changed={}", git_head_file.display());
}

// Determine the name of the current ref.
// This will quit if HEAD is detached.
let git_head_ref = get_output("git", &["symbolic-ref", "-q", "HEAD"])?;
// Ask git where this ref is stored.
let git_head_ref_file =
PathBuf::from(get_output("git", &["rev-parse", "--git-path", &git_head_ref])?);
// If this ref is packed, the file does not exist. However, the checked-out branch is never (?)
// packed, so we should always be able to find this file.
if git_head_ref_file.exists() {
println!("cargo::rerun-if-changed={}", git_head_ref_file.display());
}

Some(())
}

#[must_use]
pub fn get_commit_hash() -> Option<String> {
let mut stdout = get_output("git", &["rev-parse", "HEAD"])?;
stdout.truncate(10);
Some(stdout)
}

#[must_use]
pub fn get_commit_date() -> Option<String> {
get_output("git", &["log", "-1", "--date=short", "--pretty=format:%cd"])
}

fn main() {
// Don't rebuild miri when nothing changed.
println!("cargo:rerun-if-changed=build.rs");
// gather version info
rustc_tools_util::setup_version_info!();
let _ = rerun_if_git_changes();
println!("cargo:rustc-env=GIT_COMMIT_HASH={}", get_commit_hash().unwrap_or_default());
println!("cargo:rustc-env=GIT_COMMIT_DATE={}", get_commit_date().unwrap_or_default());
}
2 changes: 1 addition & 1 deletion src/tools/miri/cargo-miri/src/phases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn show_help() {

fn show_version() {
print!("miri {}", env!("CARGO_PKG_VERSION"));
let version = format!("{} {}", env!("GIT_HASH"), env!("COMMIT_DATE"));
let version = format!("{} {}", env!("GIT_COMMIT_HASH"), env!("GIT_COMMIT_DATE"));
if version.len() > 1 {
// If there is actually something here, print it.
print!(" ({version})");
Expand Down
3 changes: 3 additions & 0 deletions src/tools/miri/josh-sync.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
repo = "miri"
filter = ":rev(75dd959a3a40eb5b4574f8d2e23aa6efbeb33573:prefix=src/tools/miri):/src/tools/miri"

[push-pr]
suffix = "r? @ghost"
5 changes: 4 additions & 1 deletion src/tools/miri/miri-script/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,12 @@ impl Command {
cmd!(sh, "cargo clean").run()?;
// Call `cargo metadata` on the sources in case that changes the lockfile
// (works around <https://github.com/rust-lang/rust-analyzer/issues/23392>).
// Need to set `CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE=allow` otherwise lockfiles with
// newer packages get rejected; that's fine as everything is already pinned in the lockfile.
let sysroot = cmd!(sh, "rustc --print sysroot").read()?;
let sysroot = sysroot.trim();
cmd!(sh, "cargo metadata --format-version 1 --manifest-path {sysroot}/lib/rustlib/rustc-src/rust/compiler/rustc/Cargo.toml").ignore_stdout().run()?;
cmd!(sh, "cargo metadata --format-version 1 --manifest-path {sysroot}/lib/rustlib/rustc-src/rust/compiler/rustc/Cargo.toml")
.ignore_stdout().env("CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE", "allow").run()?;
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/priroda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ To update the expected output files after an intentional output change, run:
| `out`, `stepout` | Run until execution returns to a shallower user frame. |
| `c`, `continue` | Continue until the program finishes or reaches a breakpoint. |
| `b <path>:<line>`, `break <path>:<line>` | Add a source-location breakpoint. |
| `l`, `locals` | List source-level locals in the current frame by name. |
| `l`, `locals` | List the MIR locals of the current frame, with source names and projections where debug info provides them. |
| `p <local>`, `print <local>` | Print one MIR local by numeric id. |
| `f <alloc> <offset>`, `follow <alloc> <offset>` | Render allocation bytes from an offset, including the full allocation size. |
| `q`, `quit` | Exit Priroda. |
Expand Down
24 changes: 19 additions & 5 deletions src/tools/miri/priroda/tests/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// so the relative `tests/ui/...` paths resolve in the same way as a standalone crate.
std::env::set_current_dir(&priroda_dir)?;

let rustc_sysroot = Command::new("rustc").arg("--print").arg("sysroot").output()?;
let rustc_sysroot = String::from_utf8(rustc_sysroot.stdout)?.trim().to_owned();

let mut program = CommandBuilder::rustc();
program.program = PathBuf::from(env!("CARGO_BIN_EXE_priroda"));

Expand All @@ -47,22 +44,39 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let manifest_dir_regex =
Regex::new(&regex::escape(&priroda_dir.display().to_string())).unwrap();
let miri_dir_regex = Regex::new(&regex::escape(&miri_dir.display().to_string())).unwrap();
let rustc_sysroot_regex = Regex::new(&regex::escape(&rustc_sysroot)).unwrap();
let rustlib_regex =
Regex::new("[^ \n`\"\']*/library/(core|alloc|std|panic_(unwind|abort))/src").unwrap();
let pointer_regex = Regex::new(r"0x[0-9a-f]+\[alloc[0-9]+\]<[0-9]+>").unwrap();
let crlf_regex = Regex::new(r"\r\n").unwrap();
// DAP Content-Length headers embed the byte count of the following JSON,
// which changes when path normalisation alters the embedded file paths.
// Replace them with a placeholder so path-length differences between
// machines do not make Content-Length drift from the normalised body.
let content_length_regex = Regex::new(r"Content-Length: \d+").unwrap();
// Local indices are assigned while MIR is built, so a rustup that inserts a
// temporary changes them. Keep the storage projection suffix (`.0`, `.*`,
// ` as variant#1.0`): it says which field or variant of the local the row
// reads. `print <id>` echoes are rewritten too, so they stop pinning the id.
let local_id_regex = Regex::new(r"Id: _[0-9]+").unwrap();
// An unnamed `<dead>` row has no name and no rendered value, so it only pins
// rustc's temporary inventory and that slot's `Ty:` string. Named locals stay
// asserted even when dead. `Name:` scoping leaves `print <id>` rows alone,
// since they have no such field. The `(priroda) ` prompt must match too, or
// dropping the first row of a block would splice the next row onto the
// prompt; no fixture covers that yet. Matching the id as `[^,]+` keeps this
// rule independent of the order the two rules run in.
let unnamed_dead_local_regex =
Regex::new(r"(?:\(priroda\) )?Name: <none>, Id: [^,]+, [^\n]*Value: <dead>\n?").unwrap();
config.comment_defaults.base().normalize_stdout.extend([
(manifest_dir_regex.into(), b"{MANIFEST_DIR}".to_vec()),
(miri_dir_regex.into(), b"{MIRI_DIR}".to_vec()),
(rustc_sysroot_regex.into(), b"{RUSTC_SYSROOT}".to_vec()),
(rustlib_regex.into(), b"RUSTLIB/$1/src".to_vec()),
(pointer_regex.into(), b"{ALLOC_PTR}".to_vec()),
// DAP frames use CRLF headers; keep checked-in stdout fixtures readable.
(crlf_regex.into(), b"\n".to_vec()),
(content_length_regex.into(), b"Content-Length: {CONTENT_LENGTH}".to_vec()),
(unnamed_dead_local_regex.into(), b"".to_vec()),
(local_id_regex.into(), b"Id: _{LOCAL}".to_vec()),
]);

// Priroda UI tests do not currently require annotation comments in the test files.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(priroda) {RUSTC_SYSROOT}/lib/rustlib/src/rust/library/std/src/rt.rs:206
(priroda) RUSTLIB/std/src/rt.rs:206
(priroda) stepOut is not meaningful in the outermost user frame
(priroda) quitting
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Content-Length: {CONTENT_LENGTH}

{"seq":14,"type":"event","event":"stopped","body":{"reason":"step","description":null,"threadId":1,"preserveFocusHint":null,"text":null,"allThreadsStopped":true,"hitBreakpointIds":null}}Content-Length: {CONTENT_LENGTH}

{"seq":15,"type":"response","request_seq":10,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1,"name":"<fn() as std::ops::FnOnce<()>>::call_once - shim(fn())","source":{"name":"function.rs","path":"{RUSTC_SYSROOT}/lib/rustlib/src/rust/library/core/src/ops/function.rs","sourceReference":0},"line":250,"column":5}],"totalFrames":1},"error":null}
{"seq":15,"type":"response","request_seq":10,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1,"name":"<fn() as std::ops::FnOnce<()>>::call_once - shim(fn())","source":{"name":"function.rs","path":"RUSTLIB/core/src/ops/function.rs","sourceReference":0},"line":250,"column":5}],"totalFrames":1},"error":null}
16 changes: 8 additions & 8 deletions src/tools/miri/priroda/tests/ui/locals_access_field.stdout
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
(priroda) breakpoint added: {MANIFEST_DIR}/tests/ui/locals_access_field.rs:14
(priroda) Hit breakpoint
{MANIFEST_DIR}/tests/ui/locals_access_field.rs:14
(priroda) Name: <none>, Id: _0, Ty: (), Value: <uninit>
Name: extraslice, Id: _1, Ty: ExtraSlice<'_>, Value: ExtraSlice { _slice: [{ALLOC_PTR} 00 00 00 00 00 00 00 00], _extra: [00 00 00 00] }
Name: _slice, Id: _2, Ty: &[u8], Value: (pointer to {ALLOC_PTR}, 0x0000000000000000): &[u8]
Name: _extra, Id: _3, Ty: u32, Value: 0_u32
(priroda) Id: _0, Ty: (), Value: <uninit>
(priroda) Id: _1, Ty: ExtraSlice<'_>, Value: ExtraSlice { _slice: [{ALLOC_PTR} 00 00 00 00 00 00 00 00], _extra: [00 00 00 00] }
(priroda) Id: _2, Ty: &[u8], Value: (pointer to {ALLOC_PTR}, 0x0000000000000000): &[u8]
(priroda) Id: _3, Ty: u32, Value: 0_u32
(priroda) Name: <none>, Id: _{LOCAL}, Ty: (), Value: <uninit>
Name: extraslice, Id: _{LOCAL}, Ty: ExtraSlice<'_>, Value: ExtraSlice { _slice: [{ALLOC_PTR} 00 00 00 00 00 00 00 00], _extra: [00 00 00 00] }
Name: _slice, Id: _{LOCAL}, Ty: &[u8], Value: (pointer to {ALLOC_PTR}, 0x0000000000000000): &[u8]
Name: _extra, Id: _{LOCAL}, Ty: u32, Value: 0_u32
(priroda) Id: _{LOCAL}, Ty: (), Value: <uninit>
(priroda) Id: _{LOCAL}, Ty: ExtraSlice<'_>, Value: ExtraSlice { _slice: [{ALLOC_PTR} 00 00 00 00 00 00 00 00], _extra: [00 00 00 00] }
(priroda) Id: _{LOCAL}, Ty: &[u8], Value: (pointer to {ALLOC_PTR}, 0x0000000000000000): &[u8]
(priroda) Id: _{LOCAL}, Ty: u32, Value: 0_u32
(priroda) no local for this id
(priroda) no local for this id
(priroda) quitting
36 changes: 18 additions & 18 deletions src/tools/miri/priroda/tests/ui/locals_corpus_async.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@
(priroda) breakpoint added: {MANIFEST_DIR}/tests/ui/locals_corpus_async.rs:76
(priroda) Hit breakpoint
{MANIFEST_DIR}/tests/ui/locals_corpus_async.rs:31
(priroda) Name: <none>, Id: _0, Ty: (), Value: <uninit>
Name: <none>, Id: _1, Ty: (u32, i32), Value: (5_u32, 6_i32)
Name: first, Id: _1.0, Ty: u32, Value: 5_u32
Name: second, Id: _1.1, Ty: i32, Value: 6_i32
(priroda) Name: <none>, Id: _{LOCAL}, Ty: (), Value: <uninit>
Name: <none>, Id: _{LOCAL}, Ty: (u32, i32), Value: (5_u32, 6_i32)
Name: first, Id: _{LOCAL}.0, Ty: u32, Value: 5_u32
Name: second, Id: _{LOCAL}.1, Ty: i32, Value: 6_i32
(priroda) Hit breakpoint
{MANIFEST_DIR}/tests/ui/locals_corpus_async.rs:45
(priroda) Name: <none>, Id: _0, Ty: (), Value: <uninit>
Name: <none>, Id: _1, Ty: S, Value: S { x: 5f32 }
Name: x, Id: _1.0, Ty: f32, Value: 5f32
(priroda) Name: <none>, Id: _{LOCAL}, Ty: (), Value: <uninit>
Name: <none>, Id: _{LOCAL}, Ty: S, Value: S { x: 5f32 }
Name: x, Id: _{LOCAL}.0, Ty: f32, Value: 5f32
(priroda) Hit breakpoint
{MANIFEST_DIR}/tests/ui/locals_corpus_async.rs:55
(priroda) Name: <none>, Id: _0, Ty: (), Value: <uninit>
Name: <none>, Id: _1, Ty: std::option::Option<i32>, Value: Option::Some([05 00 00 00])
Name: inner, Id: _1 as variant#1.0, Ty: i32, Value: [05 00 00 00]
(priroda) Name: <none>, Id: _{LOCAL}, Ty: (), Value: <uninit>
Name: <none>, Id: _{LOCAL}, Ty: std::option::Option<i32>, Value: Option::Some([05 00 00 00])
Name: inner, Id: _{LOCAL} as variant#1.0, Ty: i32, Value: [05 00 00 00]
(priroda) Hit breakpoint
{MANIFEST_DIR}/tests/ui/locals_corpus_async.rs:66
(priroda) Name: <none>, Id: _0, Ty: (), Value: <uninit>
Name: <none>, Id: _1, Ty: std::option::Option<&i32>, Value: Option::Some([{ALLOC_PTR}])
Name: pointer, Id: _1 as variant#1.0, Ty: &i32, Value: [{ALLOC_PTR}]
Name: deref, Id: _1 as variant#1.0.*, Ty: i32, Value: [05 00 00 00]
(priroda) Name: <none>, Id: _{LOCAL}, Ty: (), Value: <uninit>
Name: <none>, Id: _{LOCAL}, Ty: std::option::Option<&i32>, Value: Option::Some([{ALLOC_PTR}])
Name: pointer, Id: _{LOCAL} as variant#1.0, Ty: &i32, Value: [{ALLOC_PTR}]
Name: deref, Id: _{LOCAL} as variant#1.0.*, Ty: i32, Value: [05 00 00 00]
(priroda) Allocation alloc2+0: [05 00 00 00]
(priroda) Hit breakpoint
{MANIFEST_DIR}/tests/ui/locals_corpus_async.rs:20
(priroda) Name: <none>, Id: _0, Ty: (), Value: <uninit>
Name: <none>, Id: _1, Ty: &mut std::option::Option<i32>, Value: {&_: &mut std::option::Option<i32>}
Name: foo, Id: _1.* as variant#1.0, Ty: i32, Value: [05 00 00 00]
(priroda) Name: <none>, Id: _{LOCAL}, Ty: (), Value: <uninit>
Name: <none>, Id: _{LOCAL}, Ty: &mut std::option::Option<i32>, Value: {&_: &mut std::option::Option<i32>}
Name: foo, Id: _{LOCAL}.* as variant#1.0, Ty: i32, Value: [05 00 00 00]
(priroda) Hit breakpoint
{MANIFEST_DIR}/tests/ui/locals_corpus_async.rs:76
(priroda) Name: <none>, Id: _0, Ty: (), Value: <uninit>
(priroda) Name: <none>, Id: _{LOCAL}, Ty: (), Value: <uninit>
(priroda) quitting
9 changes: 3 additions & 6 deletions src/tools/miri/priroda/tests/ui/locals_in_function.stdout
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
(priroda) breakpoint added: {MANIFEST_DIR}/tests/ui/locals_in_function.rs:5
(priroda) Hit breakpoint
{MANIFEST_DIR}/tests/ui/locals_in_function.rs:5
(priroda) Name: <none>, Id: _0, Ty: (), Value: <uninit>
Name: x, Id: _1, Ty: i32, Value: 1_i32
Name: y, Id: _2, Ty: bool, Value: <dead>
Name: <none>, Id: _3, Ty: (i32, bool), Value: <dead>
Name: <none>, Id: _4, Ty: i32, Value: <dead>
Name: <none>, Id: _5, Ty: bool, Value: <dead>
(priroda) Name: <none>, Id: _{LOCAL}, Ty: (), Value: <uninit>
Name: x, Id: _{LOCAL}, Ty: i32, Value: 1_i32
Name: y, Id: _{LOCAL}, Ty: bool, Value: <dead>
(priroda) quitting
24 changes: 9 additions & 15 deletions src/tools/miri/priroda/tests/ui/locals_mplace_metadata.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,17 @@
(priroda) breakpoint added: {MANIFEST_DIR}/tests/ui/locals_mplace_metadata.rs:16
(priroda) Hit breakpoint
{MANIFEST_DIR}/tests/ui/locals_mplace_metadata.rs:8
(priroda) Name: <none>, Id: _0, Ty: (), Value: <uninit>
Name: slice, Id: _1, Ty: [u8], Value: [[01], [02], [03]]
Name: <none>, Id: _2, Ty: &[u8], Value: <dead>
Name: <none>, Id: _3, Ty: &[u8], Value: <dead>
(priroda) Id: _1, Ty: [u8], Value: [[01], [02], [03]]
(priroda) Name: <none>, Id: _{LOCAL}, Ty: (), Value: <uninit>
Name: slice, Id: _{LOCAL}, Ty: [u8], Value: [[01], [02], [03]]
(priroda) Id: _{LOCAL}, Ty: [u8], Value: [[01], [02], [03]]
(priroda) Hit breakpoint
{MANIFEST_DIR}/tests/ui/locals_mplace_metadata.rs:12
(priroda) Name: <none>, Id: _0, Ty: (), Value: <uninit>
Name: text, Id: _1, Ty: str, Value: [__ __ __]
Name: <none>, Id: _2, Ty: &str, Value: <dead>
Name: <none>, Id: _3, Ty: &str, Value: <dead>
(priroda) Id: _1, Ty: str, Value: [__ __ __]
(priroda) Name: <none>, Id: _{LOCAL}, Ty: (), Value: <uninit>
Name: text, Id: _{LOCAL}, Ty: str, Value: [__ __ __]
(priroda) Id: _{LOCAL}, Ty: str, Value: [__ __ __]
(priroda) Hit breakpoint
{MANIFEST_DIR}/tests/ui/locals_mplace_metadata.rs:16
(priroda) Name: <none>, Id: _0, Ty: (), Value: <uninit>
Name: value, Id: _1, Ty: dyn Marker, Value: [01 00 00 00 02 00 00 00]
Name: <none>, Id: _2, Ty: &dyn Marker, Value: <dead>
Name: <none>, Id: _3, Ty: &dyn Marker, Value: <dead>
(priroda) Id: _1, Ty: dyn Marker, Value: [01 00 00 00 02 00 00 00]
(priroda) Name: <none>, Id: _{LOCAL}, Ty: (), Value: <uninit>
Name: value, Id: _{LOCAL}, Ty: dyn Marker, Value: [01 00 00 00 02 00 00 00]
(priroda) Id: _{LOCAL}, Ty: dyn Marker, Value: [01 00 00 00 02 00 00 00]
(priroda) quitting
Loading
Loading