Skip to content

update Miri #104456

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

Merged
merged 27 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
aaa2392
Merge from rustc
RalfJung Nov 5, 2022
42e450d
Auto merge of #2650 - RalfJung:rustup, r=RalfJung
bors Nov 5, 2022
4828edf
Auto merge of #2638 - DrMeepster:windows-condvars, r=RalfJung
bors Nov 6, 2022
46d0df4
remove a stray stderr file
RalfJung Nov 6, 2022
724c1a0
Auto merge of #2653 - RalfJung:stderr, r=RalfJung
bors Nov 6, 2022
943f88b
README: Add macos cache deletion command
mkroening Nov 6, 2022
57d06f7
Auto merge of #2654 - mkroening:macos-cache, r=RalfJung
bors Nov 6, 2022
1f0a672
bump rustc-build-sysroot
RalfJung Nov 6, 2022
9c574d8
Auto merge of #2655 - RalfJung:rustc-build-sysroot, r=RalfJung
bors Nov 6, 2022
2b39687
Add miri_alloc, miri_dealloc
mkroening Nov 7, 2022
de562ec
Bump ui test
oli-obk Nov 8, 2022
71c3ecf
Auto merge of #2659 - oli-obk:ui_test_bump, r=RalfJung
bors Nov 8, 2022
c02fa89
Merge from rustc
RalfJung Nov 10, 2022
9356627
Auto merge of #2662 - RalfJung:rustup, r=RalfJung
bors Nov 10, 2022
6adb2df
pthread: slight refactoring of how we access the sync object fields
RalfJung Nov 13, 2022
2e6676d
Auto merge of #2663 - RalfJung:sync, r=RalfJung
bors Nov 13, 2022
096c33f
final tweaks
RalfJung Nov 13, 2022
9ef0de9
Auto merge of #2657 - mkroening:miri-alloc, r=RalfJung
bors Nov 13, 2022
8d7f257
Merge from rustc
RalfJung Nov 15, 2022
c6649aa
Auto merge of #2665 - RalfJung:rustup, r=RalfJung
bors Nov 15, 2022
3c72492
update josh instructions
RalfJung Nov 15, 2022
a046f62
Auto merge of #2666 - RalfJung:josh, r=RalfJung
bors Nov 15, 2022
a47e431
adjust josh pushing and remove ./miri toolchain updating the toolchai…
RalfJung Nov 15, 2022
209bcbb
Auto merge of #2667 - RalfJung:josh, r=RalfJung
bors Nov 15, 2022
5516273
update lockfile
RalfJung Nov 15, 2022
6906f08
allow fastrand dependency
RalfJung Nov 16, 2022
157b2d5
ensure rand has its default features enabled
RalfJung Nov 16, 2022
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
78 changes: 39 additions & 39 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,18 @@ dependencies = [
"regex-automata",
]

[[package]]
name = "bstr"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fca0852af221f458706eb0725c03e4ed6c46af9ac98e6a689d5e634215d594dd"
dependencies = [
"memchr",
"once_cell",
"regex-automata",
"serde",
]

[[package]]
name = "build-manifest"
version = "0.1.0"
Expand Down Expand Up @@ -919,25 +931,11 @@ dependencies = [
"cfg-if 1.0.0",
]

[[package]]
name = "crossbeam"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ae5588f6b3c3cb05239e90bd110f257254aecd01e4635400391aeae07497845"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-channel",
"crossbeam-deque",
"crossbeam-epoch",
"crossbeam-queue",
"crossbeam-utils",
]

[[package]]
name = "crossbeam-channel"
version = "0.5.4"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53"
checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils",
Expand Down Expand Up @@ -967,16 +965,6 @@ dependencies = [
"scopeguard",
]

[[package]]
name = "crossbeam-queue"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils",
]

[[package]]
name = "crossbeam-utils"
version = "0.8.8"
Expand Down Expand Up @@ -1260,6 +1248,15 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"

[[package]]
name = "fastrand"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499"
dependencies = [
"instant",
]

[[package]]
name = "filetime"
version = "0.2.14"
Expand Down Expand Up @@ -1584,7 +1581,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a1e17342619edbc21a964c2afbeb6c820c6a2560032872f397bb97ea127bd0a"
dependencies = [
"aho-corasick",
"bstr",
"bstr 0.2.17",
"fnv",
"log",
"regex",
Expand Down Expand Up @@ -2341,17 +2338,17 @@ dependencies = [

[[package]]
name = "once_cell"
version = "1.12.0"
version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225"
checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"

[[package]]
name = "opener"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ea3ebcd72a54701f56345f16785a6d3ac2df7e986d273eb4395c0b01db17952"
dependencies = [
"bstr",
"bstr 0.2.17",
"winapi",
]

Expand Down Expand Up @@ -3008,9 +3005,9 @@ dependencies = [

[[package]]
name = "rustc-build-sysroot"
version = "0.3.3"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec5f3689b6c560d6a3a17fcbe54204cd870b4fcf46342d60de16715b660d2c92"
checksum = "20c4b4625eeb148cccf82d5e9b90ad7fab3b11a0204cf75cc7fa04981a0fdffd"
dependencies = [
"anyhow",
"rustc_version",
Expand Down Expand Up @@ -3098,9 +3095,10 @@ dependencies = [
name = "rustc-workspace-hack"
version = "1.0.0"
dependencies = [
"bstr",
"bstr 0.2.17",
"clap 3.2.20",
"libz-sys",
"rand 0.8.5",
"regex",
"serde_json",
"syn",
Expand Down Expand Up @@ -4767,13 +4765,13 @@ dependencies = [

[[package]]
name = "tempfile"
version = "3.2.0"
version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22"
checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
dependencies = [
"cfg-if 1.0.0",
"fastrand",
"libc",
"rand 0.8.5",
"redox_syscall",
"remove_dir_all",
"winapi",
Expand Down Expand Up @@ -5119,20 +5117,22 @@ checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"

[[package]]
name = "ui_test"
version = "0.3.1"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d1f546a5883ae78da735bba529ec1116661e2f73582f23920d994dc97da3a22"
checksum = "bf4559da3fe6b481f8674a29379677cb9606cd6f75fc254a2c9834c55638503d"
dependencies = [
"bstr 1.0.1",
"cargo_metadata 0.15.0",
"color-eyre",
"colored",
"crossbeam",
"crossbeam-channel",
"diff",
"lazy_static",
"regex",
"rustc_version",
"serde",
"serde_json",
"tempfile",
]

[[package]]
Expand Down
6 changes: 3 additions & 3 deletions src/tools/miri/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ jobs:
shell: bash
run: |
if [[ ${{ github.event_name }} == 'schedule' ]]; then
./miri toolchain HEAD --host ${{ matrix.host_target }}
else
./miri toolchain "" --host ${{ matrix.host_target }}
echo "Building against latest rustc git version"
git ls-remote https://github.com/rust-lang/rust/ HEAD | cut -f 1 > rust-version
fi
./miri toolchain --host ${{ matrix.host_target }}

- name: Show Rust version
run: |
Expand Down
33 changes: 9 additions & 24 deletions src/tools/miri/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ is set the `MIRI_LIB_SRC` environment variable to the `library` folder of a
`rust-lang/rust` repository checkout. Note that changing files in that directory
does not automatically trigger a re-build of the standard library; you have to
clear the Miri build cache manually (on Linux, `rm -rf ~/.cache/miri`;
and on Windows, `rmdir /S "%LOCALAPPDATA%\rust-lang\miri\cache"`).
on Windows, `rmdir /S "%LOCALAPPDATA%\rust-lang\miri\cache"`;
and on macOS, `rm -rf ~/Library/Caches/org.rust-lang.miri`).

### Benchmarking

Expand Down Expand Up @@ -208,23 +209,6 @@ We described above the simplest way to get a working build environment for Miri,
which is to use the version of rustc indicated by `rustc-version`. But
sometimes, that is not enough.

### Updating `rustc-version`

The `rustc-version` file is regularly updated to keep Miri close to the latest
version of rustc. Usually, new contributors do not have to worry about this. But
sometimes a newer rustc is needed for a patch, and sometimes Miri needs fixing
for changes in rustc. In both cases, `rustc-version` needs updating.

To update the `rustc-version` file and install the latest rustc, you can run:
```
./miri toolchain HEAD
```

Now edit Miri until `./miri test` passes, and submit a PR. Generally, it is
preferred to separate updating `rustc-version` and doing what it takes to get
Miri working again, from implementing new features that rely on the updated
rustc. This avoids blocking all Miri development on landing a big PR.

### Building Miri with a locally built rustc

[building Miri with a locally built rustc]: #building-miri-with-a-locally-built-rustc
Expand Down Expand Up @@ -282,13 +266,13 @@ With this, you should now have a working development setup! See
## Advanced topic: Syncing with the rustc repo

We use the [`josh` proxy](https://github.com/josh-project/josh) to transmit
changes between the rustc and Miri repositories. For now, a fork of josh needs to be built
from source. This downloads and runs josh:
changes between the rustc and Miri repositories. For now, the latest git version
of josh needs to be built from source. This downloads and runs josh:

```sh
git clone https://github.com/RalfJung/josh
git clone https://github.com/josh-project/josh
cd josh
cargo run --release -p josh-proxy -- --local=$(pwd)/local --remote=https://github.com --no-background
cargo run --release -p josh-proxy -- --local=local --remote=https://github.com --no-background
```

### Importing changes from the rustc repo
Expand All @@ -298,9 +282,10 @@ We assume we start on an up-to-date master branch in the Miri repo.

```sh
# Fetch and merge rustc side of the history. Takes ca 5 min the first time.
# This will also update the 'rustc-version' file.
./miri rustc-pull
# Update toolchain reference and apply formatting.
./miri toolchain HEAD && ./miri fmt
# Update local toolchain and apply formatting.
./miri toolchain && ./miri fmt
git commit -am "rustup"
```

Expand Down
Loading