Skip to content

Commit 792d71a

Browse files
committed
Auto merge of #17880 - lnicola:sync-from-rust, r=lnicola
minor: sync from downstream
2 parents c24fc69 + f3c5a95 commit 792d71a

File tree

155 files changed

+2144
-1131
lines changed

Some content is hidden

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

155 files changed

+2144
-1131
lines changed

Cargo.lock

+135-102
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+9-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ default-run = "miri"
99
edition = "2021"
1010

1111
[lib]
12-
test = true # we have unit tests
12+
test = true # we have unit tests
1313
doctest = false # but no doc tests
1414

1515
[[bin]]
1616
name = "miri"
17-
test = false # we have no unit tests
17+
test = false # we have no unit tests
1818
doctest = false # and no doc tests
1919

2020
[dependencies]
@@ -42,6 +42,13 @@ libc = "0.2"
4242
libffi = "3.2.0"
4343
libloading = "0.8"
4444

45+
[target.'cfg(target_family = "windows")'.dependencies]
46+
windows-sys = { version = "0.52", features = [
47+
"Win32_Foundation",
48+
"Win32_System_IO",
49+
"Win32_Storage_FileSystem",
50+
] }
51+
4552
[dev-dependencies]
4653
colored = "2"
4754
ui_test = "0.21.1"

README.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ degree documented below):
212212
- All Rust [Tier 1 targets](https://doc.rust-lang.org/rustc/platform-support.html) are supported by
213213
Miri. They are all checked on Miri's CI, and some (at least one per OS) are even checked on every
214214
Rust PR, so the shipped Miri should always work on these targets.
215-
- `aarch64-apple-darwin` is supported.
216215
- `s390x-unknown-linux-gnu` is supported as our "big-endian target of choice".
217216
- For every other target with OS `linux`, `macos`, or `windows`, Miri should generally work, but we
218217
make no promises and we don't run tests for such targets.
@@ -398,6 +397,8 @@ to Miri failing to detect cases of undefined behavior in a program.
398397
application instead of raising an error within the context of Miri (and halting
399398
execution). Note that code might not expect these operations to ever panic, so
400399
this flag can lead to strange (mis)behavior.
400+
* `-Zmiri-recursive-validation` is a *highly experimental* flag that makes validity checking
401+
recurse below references.
401402
* `-Zmiri-retag-fields[=<all|none|scalar>]` controls when Stacked Borrows retagging recurses into
402403
fields. `all` means it always recurses (the default, and equivalent to `-Zmiri-retag-fields`
403404
without an explicit value), `none` means it never recurses, `scalar` means it only recurses for
@@ -474,6 +475,19 @@ Miri provides some `extern` functions that programs can import to access
474475
Miri-specific functionality. They are declared in
475476
[/tests/utils/miri\_extern.rs](/tests/utils/miri_extern.rs).
476477

478+
## Entry point for no-std binaries
479+
480+
Binaries that do not use the standard library are expected to declare a function like this so that
481+
Miri knows where it is supposed to start execution:
482+
483+
```rust
484+
#[cfg(miri)]
485+
#[no_mangle]
486+
fn miri_start(argc: isize, argv: *const *const u8) -> isize {
487+
// Call the actual start function that your project implements, based on your target's conventions.
488+
}
489+
```
490+
477491
## Contributing and getting help
478492

479493
If you want to contribute to Miri, great! Please check out our

0 commit comments

Comments
 (0)