Skip to content

Commit b7d8c88

Browse files
committed
Auto merge of #111036 - RalfJung:miri, r=RalfJung
update Miri r? `@ghost`
2 parents 4b87ed9 + f4acc67 commit b7d8c88

File tree

90 files changed

+1436
-455
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+1436
-455
lines changed

Cargo.lock

+4-2
Original file line numberDiff line numberDiff line change
@@ -5100,11 +5100,12 @@ checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81"
51005100

51015101
[[package]]
51025102
name = "ui_test"
5103-
version = "0.5.0"
5103+
version = "0.6.2"
51045104
source = "registry+https://github.com/rust-lang/crates.io-index"
5105-
checksum = "54ddb6f31025943e2f9d59237f433711c461a43d9415974c3eb3a4902edc1c1f"
5105+
checksum = "3e10f5f88ce8c331a388deda1e6e2bd533c73ca89cc5f539a3df02ed35c8efba"
51065106
dependencies = [
51075107
"bstr 1.3.0",
5108+
"cargo-platform",
51085109
"cargo_metadata 0.15.3",
51095110
"color-eyre",
51105111
"colored",
@@ -5113,6 +5114,7 @@ dependencies = [
51135114
"lazy_static",
51145115
"regex",
51155116
"rustc_version",
5117+
"rustfix",
51165118
"serde",
51175119
"serde_json",
51185120
"tempfile",

src/tools/miri/Cargo.lock

+24-4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ dependencies = [
2626
"memchr",
2727
]
2828

29+
[[package]]
30+
name = "anyhow"
31+
version = "1.0.70"
32+
source = "registry+https://github.com/rust-lang/crates.io-index"
33+
checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4"
34+
2935
[[package]]
3036
name = "atty"
3137
version = "0.2.14"
@@ -292,9 +298,9 @@ dependencies = [
292298

293299
[[package]]
294300
name = "libffi-sys"
295-
version = "2.2.1"
301+
version = "2.3.0"
296302
source = "registry+https://github.com/rust-lang/crates.io-index"
297-
checksum = "dc65067b78c0fc069771e8b9a9e02df71e08858bec92c1f101377c67b9dca7c7"
303+
checksum = "f36115160c57e8529781b4183c2bb51fdc1f6d6d1ed345591d84be7703befb3c"
298304
dependencies = [
299305
"cc",
300306
]
@@ -570,6 +576,18 @@ dependencies = [
570576
"semver",
571577
]
572578

579+
[[package]]
580+
name = "rustfix"
581+
version = "0.6.1"
582+
source = "registry+https://github.com/rust-lang/crates.io-index"
583+
checksum = "ecd2853d9e26988467753bd9912c3a126f642d05d229a4b53f5752ee36c56481"
584+
dependencies = [
585+
"anyhow",
586+
"log",
587+
"serde",
588+
"serde_json",
589+
]
590+
573591
[[package]]
574592
name = "ryu"
575593
version = "1.0.12"
@@ -744,11 +762,12 @@ dependencies = [
744762

745763
[[package]]
746764
name = "ui_test"
747-
version = "0.5.0"
765+
version = "0.6.2"
748766
source = "registry+https://github.com/rust-lang/crates.io-index"
749-
checksum = "54ddb6f31025943e2f9d59237f433711c461a43d9415974c3eb3a4902edc1c1f"
767+
checksum = "3e10f5f88ce8c331a388deda1e6e2bd533c73ca89cc5f539a3df02ed35c8efba"
750768
dependencies = [
751769
"bstr",
770+
"cargo-platform",
752771
"cargo_metadata",
753772
"color-eyre",
754773
"colored",
@@ -757,6 +776,7 @@ dependencies = [
757776
"lazy_static",
758777
"regex",
759778
"rustc_version",
779+
"rustfix",
760780
"serde",
761781
"serde_json",
762782
"tempfile",

src/tools/miri/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ libloading = "0.7"
3939

4040
[dev-dependencies]
4141
colored = "2"
42-
ui_test = "0.5"
42+
ui_test = "0.6.2"
4343
rustc_version = "0.4"
4444
# Features chosen to match those required by env_logger, to avoid rebuilds
4545
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }

src/tools/miri/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ to Miri failing to detect cases of undefined behavior in a program.
407407
* `-Zmiri-retag-fields=<all|none|scalar>` controls when Stacked Borrows retagging recurses into
408408
fields. `all` means it always recurses (like `-Zmiri-retag-fields`), `none` means it never
409409
recurses, `scalar` (the default) means it only recurses for types where we would also emit
410-
`noalias` annotations in the generated LLVM IR (types passed as indivudal scalars or pairs of
410+
`noalias` annotations in the generated LLVM IR (types passed as individual scalars or pairs of
411411
scalars). Setting this to `none` is **unsound**.
412412
* `-Zmiri-tag-gc=<blocks>` configures how often the pointer tag garbage collector runs. The default
413413
is to search for and remove unreachable tags once every `10000` basic blocks. Setting this to

src/tools/miri/cargo-miri/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ fn main() {
8181
"miri" => phase_cargo_miri(args),
8282
"runner" => phase_runner(args, RunnerPhase::Cargo),
8383
arg if arg == env::var("RUSTC").unwrap() => {
84-
// If the first arg is equal to the RUSTC env ariable (which should be set at this
84+
// If the first arg is equal to the RUSTC env variable (which should be set at this
8585
// point), then we need to behave as rustc. This is the somewhat counter-intuitive
8686
// behavior of having both RUSTC and RUSTC_WRAPPER set
8787
// (see https://github.com/rust-lang/cargo/issues/10886).

src/tools/miri/miri

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ rustc-pull)
121121
# Update rust-version file. As a separate commit, since making it part of
122122
# the merge has confused the heck out of josh in the past.
123123
echo "$FETCH_COMMIT" > rust-version
124-
git commit rust-version -m "Preparing for merge from rustc"
124+
git commit rust-version -m "Preparing for merge from rustc" || (echo "FAILED to commit rust-version file, something went wrong"; exit 1)
125125
# Fetch given rustc commit and note down which one that was
126-
git fetch http://localhost:8000/rust-lang/rust.git@$FETCH_COMMIT$JOSH_FILTER.git
127-
git merge FETCH_HEAD --no-ff -m "Merge from rustc"
126+
git fetch http://localhost:8000/rust-lang/rust.git@$FETCH_COMMIT$JOSH_FILTER.git || (echo "FAILED to fetch new commits, something went wrong"; exit 1)
127+
git merge FETCH_HEAD --no-ff -m "Merge from rustc" || (echo "FAILED to merge new commits, something went wrong"; exit 1)
128128
exit 0
129129
;;
130130
rustc-push)

src/tools/miri/rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d4be8efc6296bace5b1e165f1b34d3c6da76aa8e
1+
eb62877597000ccf8bb99ab131b5977344afdfa3

src/tools/miri/src/bin/miri.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl rustc_driver::Callbacks for MiriBeRustCompilerCalls {
120120
#[allow(rustc::potential_query_instability)] // rustc_codegen_ssa (where this code is copied from) also allows this lint
121121
fn config(&mut self, config: &mut Config) {
122122
if config.opts.prints.is_empty() && self.target_crate {
123-
// Queries overriden here affect the data stored in `rmeta` files of dependencies,
123+
// Queries overridden here affect the data stored in `rmeta` files of dependencies,
124124
// which will be used later in non-`MIRI_BE_RUSTC` mode.
125125
config.override_queries = Some(|_, local_providers, _| {
126126
// `exported_symbols` and `reachable_non_generics` provided by rustc always returns

src/tools/miri/src/borrow_tracker/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ pub enum BorrowTrackerMethod {
238238
}
239239

240240
impl BorrowTrackerMethod {
241-
pub fn instanciate_global_state(self, config: &MiriConfig) -> GlobalState {
241+
pub fn instantiate_global_state(self, config: &MiriConfig) -> GlobalState {
242242
RefCell::new(GlobalStateInner::new(
243243
self,
244244
config.tracked_pointer_tags.clone(),

src/tools/miri/src/borrow_tracker/stacked_borrows/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ impl<'history, 'ecx, 'mir, 'tcx> DiagnosticCx<'history, 'ecx, 'mir, 'tcx> {
292292
.rev()
293293
.find_map(|event| {
294294
// First, look for a Creation event where the tag and the offset matches. This
295-
// ensrues that we pick the right Creation event when a retag isn't uniform due to
295+
// ensures that we pick the right Creation event when a retag isn't uniform due to
296296
// Freeze.
297297
let range = event.retag.range;
298298
if event.retag.new_tag == tag

src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ impl<'tcx> Stack {
433433
let (Some(granting_idx), ProvenanceExtra::Concrete(_)) = (granting_idx, derived_from) else {
434434
// The parent is a wildcard pointer or matched the unknown bottom.
435435
// This is approximate. Nobody knows what happened, so forget everything.
436-
// The new thing is SRW anyway, so we cannot push it "on top of the unkown part"
436+
// The new thing is SRW anyway, so we cannot push it "on top of the unknown part"
437437
// (for all we know, it might join an SRW group inside the unknown).
438438
trace!("reborrow: forgetting stack entirely due to SharedReadWrite reborrow from wildcard or unknown");
439439
self.set_unknown_bottom(global.next_ptr_tag);
@@ -825,7 +825,7 @@ trait EvalContextPrivExt<'mir: 'ecx, 'tcx: 'mir, 'ecx>: crate::MiriInterpCxExt<'
825825
Ok(Some(alloc_id))
826826
}
827827

828-
/// Retags an indidual pointer, returning the retagged version.
828+
/// Retags an individual pointer, returning the retagged version.
829829
/// `kind` indicates what kind of reference is being created.
830830
fn sb_retag_reference(
831831
&mut self,

src/tools/miri/src/borrow_tracker/stacked_borrows/stack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl Stack {
5151
// Note that the algorithm below is based on considering the tag at read_idx - 1,
5252
// so precisely considering the tag at index 0 for removal when we have an unknown
5353
// bottom would complicate the implementation. The simplification of not considering
54-
// it does not have a significant impact on the degree to which the GC mititages
54+
// it does not have a significant impact on the degree to which the GC mitigates
5555
// memory growth.
5656
let mut read_idx = 1;
5757
let mut write_idx = read_idx;

0 commit comments

Comments
 (0)