Skip to content

Commit 10b6f5b

Browse files
author
Ellen Arteca
committed
merging in changes to upstream master;
2 parents fccf782 + 86911fd commit 10b6f5b

File tree

475 files changed

+2385
-1329
lines changed

Some content is hidden

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

475 files changed

+2385
-1329
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ install that exact version of rustc as a toolchain:
2828
This will set up a rustup toolchain called `miri` and set it as an override for
2929
the current directory.
3030

31-
If you want to also have `clippy` installed, you need to run this:
32-
```
33-
./rustup-toolchain "" -c clippy
34-
```
35-
3631
[`rustup-toolchain-install-master`]: https://github.com/kennytm/rustup-toolchain-install-master
3732

3833
## Building and testing Miri
@@ -131,6 +126,8 @@ development version of Miri using
131126

132127
and then you can use it as if it was installed by `rustup`. Make sure you use
133128
the same toolchain when calling `cargo miri` that you used when installing Miri!
129+
Usually this means you have to write `cargo +miri miri ...` to select the `miri`
130+
toolchain that was installed by `./rustup-toolchain`.
134131

135132
There's a test for the cargo wrapper in the `test-cargo-miri` directory; run
136133
`./run-test.py` in there to execute it. Like `./miri test`, this respects the

Cargo.lock

Lines changed: 188 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ harness = false
5656

5757
[features]
5858
default = ["stack-cache"]
59-
# Will be enabled on CI via `--all-features`.
60-
expensive-debug-assertions = []
6159
stack-cache = []
60+
61+
[profile.dev]
62+
opt-level = 2 # because it's too slow otherwise

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ in your program, and cannot run all programs:
6565
not support networking. System API support varies between targets; if you run
6666
on Windows it is a good idea to use `--target x86_64-unknown-linux-gnu` to get
6767
better support.
68-
* Weak memory emulation may [produce weak behaivours](https://github.com/rust-lang/miri/issues/2301)
68+
* Weak memory emulation may [produce weak behaviours](https://github.com/rust-lang/miri/issues/2301)
6969
unobservable by compiled programs running on real hardware when `SeqCst` fences are used, and it
7070
cannot produce all behaviors possibly observable on real hardware.
7171

bench-cargo-miri/slice-get-unchecked/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[package]
2+
name = "slice-get-unchecked"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//! This is a stripped-down version of the code pattern that causes runtime blowup when printing
2+
//! backtraces in a failed test under cargo miri test with -Zmiri-disable-isolation.
3+
//! See https://github.com/rust-lang/miri/issues/2273
4+
5+
fn main() {
6+
let x = vec![0u8; 4096];
7+
let mut i = 0;
8+
while i < x.len() {
9+
let _element = unsafe { *x.get_unchecked(i) };
10+
i += 1;
11+
}
12+
}

ci.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ set -x
55
# Determine configuration
66
export RUSTFLAGS="-D warnings"
77
export CARGO_INCREMENTAL=0
8-
export CARGO_EXTRA_FLAGS="--all-features" # in particular, expensive-debug-assertions
8+
export CARGO_EXTRA_FLAGS="--all-features"
99

1010
# Prepare
1111
echo "Build and install miri"
12-
CARGO_EXTRA_FLAGS="" ./miri install # implicitly locked -- and the *installed* Miri does *not* get the expensive-debug-assertions feature
12+
./miri install # implicitly locked
1313
./miri build --all-targets --locked # the build that all the `./miri test` below will use
1414
echo
1515

0 commit comments

Comments
 (0)