Skip to content

Miri subtree update #116138

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 47 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
3915c4d
Preparing for merge from rustc
Sep 15, 2023
faa57a7
Merge from rustc
Sep 15, 2023
0398759
Auto merge of #3061 - rust-lang:rustup-2023-09-15, r=saethlin
bors Sep 15, 2023
09fd7a8
triagebot exclude_labels -> exclude_titles
pitaj Sep 16, 2023
25e7808
Auto merge of #3062 - pitaj:subtree-update, r=RalfJung
bors Sep 16, 2023
aa6d6ba
Preparing for merge from rustc
Sep 19, 2023
1e2813f
Merge from rustc
Sep 19, 2023
81cd774
Auto merge of #3064 - rust-lang:rustup-2023-09-19, r=RalfJung
bors Sep 19, 2023
3ca6c49
Issue of the current model: spurious reads are not possible
Vanille-N Aug 31, 2023
5910517
Auto merge of #3054 - Vanille-N:spurious-fail, r=RalfJung
bors Sep 19, 2023
4b865b7
Preparing for merge from rustc
Sep 21, 2023
de5d164
Merge from rustc
Sep 21, 2023
e6cd29d
fmt
Sep 21, 2023
96a85d6
update lockfile
RalfJung Sep 21, 2023
a11b1d8
disable no-merges check for now
RalfJung Sep 21, 2023
e018f49
remove atty dependency by updating colored
RalfJung Sep 21, 2023
ed8fbcb
fix clippy lints
RalfJung Sep 21, 2023
70f3d3e
Auto merge of #3070 - RalfJung:no-no-merges, r=RalfJung
bors Sep 21, 2023
64708fb
deprecate -Zmiri-disable-abi-check
RalfJung Sep 21, 2023
d2db689
Auto merge of #3069 - rust-lang:rustup-2023-09-21, r=RalfJung
bors Sep 21, 2023
5b8695b
Auto merge of #3071 - RalfJung:deprecate-disable-abi, r=oli-obk,saethlin
bors Sep 21, 2023
b075a9d
Implement `llvm.ctpop.v*` intrinsics
eduardosm Sep 21, 2023
838e6a6
run the cron job a bit earlier
RalfJung Sep 22, 2023
aea1eff
Auto merge of #3073 - RalfJung:cron, r=RalfJung
bors Sep 22, 2023
5211d04
Preparing for merge from rustc
Sep 22, 2023
bf31cdb
Merge from rustc
Sep 22, 2023
e6a4a1b
fmt
Sep 22, 2023
896065f
clippy
RalfJung Sep 22, 2023
ce33ca0
Auto merge of #3074 - rust-lang:rustup-2023-09-22, r=RalfJung
bors Sep 22, 2023
a0defe0
Auto merge of #3072 - eduardosm:llvm.ctpop, r=saethlin
bors Sep 23, 2023
6870634
Preparing for merge from rustc
Sep 23, 2023
3ca49cf
Merge from rustc
Sep 23, 2023
5ddf866
Auto merge of #3077 - rust-lang:rustup-2023-09-23, r=saethlin
bors Sep 23, 2023
fdbf932
Preparing for merge from rustc
Sep 24, 2023
8ae7c74
Merge from rustc
Sep 24, 2023
cf76602
fmt
Sep 24, 2023
00a8d48
Auto merge of #3079 - rust-lang:rustup-2023-09-24, r=saethlin
bors Sep 24, 2023
413ff38
Put AVX512 tests together
eduardosm Sep 24, 2023
b791f02
Auto merge of #3081 - eduardosm:avx512-tests, r=RalfJung
bors Sep 24, 2023
d6b30b8
Move `llvm.x86.*` implementations into `shims::x86`
eduardosm Sep 21, 2023
3560399
Implement `llvm.x86.addcarry.32` by refactoring `llvm.x86.addcarry.64…
eduardosm Sep 21, 2023
6ec63ed
Fix the carry semantics of `_addcarry_u32` and `_addcarry_u64`
eduardosm Sep 21, 2023
a617b89
Implement `llvm.x86.subborrow.32` and `llvm.x86.subborrow.64`
eduardosm Sep 22, 2023
4625e1e
Use `cfg` gates in x86 SSE and SSE2 tests
eduardosm Sep 24, 2023
d644603
Auto merge of #3075 - eduardosm:x86-addcarry-subborrow, r=RalfJung
bors Sep 25, 2023
0851776
remove some dead code
RalfJung Sep 25, 2023
efd04b6
Auto merge of #3084 - RalfJung:deadcode, r=RalfJung
bors Sep 25, 2023
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
4 changes: 2 additions & 2 deletions src/tools/miri/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
branches:
- 'master'
schedule:
- cron: '11 5 * * *' # At 5:11 UTC every day.
- cron: '44 4 * * *' # At 4:44 UTC every day.

defaults:
run:
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
git push -u origin $BRANCH
- name: Create Pull Request
run: |
PR=$(gh pr create -B master --title 'Automatic sync from rustc' --body '' --label subtree-sync)
PR=$(gh pr create -B master --title 'Automatic sync from rustc' --body '')
~/.local/bin/zulip-send --user $ZULIP_BOT_EMAIL --api-key $ZULIP_API_TOKEN --site https://rust-lang.zulipchat.com \
--stream miri --subject "Cron Job Failure (miri, $(date -u +%Y-%m))" \
--message "A PR doing a rustc-pull [has been automatically created]($PR) for your convenience."
Expand Down
88 changes: 52 additions & 36 deletions src/tools/miri/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@ version = "1.0.71"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8"

[[package]]
name = "atty"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi 0.1.19",
"libc",
"winapi",
]

[[package]]
name = "autocfg"
version = "1.1.0"
Expand Down Expand Up @@ -70,6 +59,12 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"

[[package]]
name = "bitflags"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"

[[package]]
name = "bstr"
version = "1.4.0"
Expand Down Expand Up @@ -155,13 +150,13 @@ dependencies = [

[[package]]
name = "colored"
version = "2.0.0"
version = "2.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd"
checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6"
dependencies = [
"atty",
"is-terminal",
"lazy_static",
"winapi",
"windows-sys 0.48.0",
]

[[package]]
Expand Down Expand Up @@ -201,12 +196,12 @@ checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"

[[package]]
name = "env_logger"
version = "0.9.3"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7"
checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
dependencies = [
"atty",
"humantime",
"is-terminal",
"log",
"regex",
"termcolor",
Expand Down Expand Up @@ -269,15 +264,6 @@ version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"

[[package]]
name = "hermit-abi"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
dependencies = [
"libc",
]

[[package]]
name = "hermit-abi"
version = "0.3.1"
Expand Down Expand Up @@ -311,11 +297,22 @@ version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220"
dependencies = [
"hermit-abi 0.3.1",
"hermit-abi",
"libc",
"windows-sys 0.48.0",
]

[[package]]
name = "is-terminal"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
dependencies = [
"hermit-abi",
"rustix 0.38.14",
"windows-sys 0.48.0",
]

[[package]]
name = "itoa"
version = "1.0.6"
Expand All @@ -330,9 +327,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"

[[package]]
name = "libc"
version = "0.2.142"
version = "0.2.148"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317"
checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b"

[[package]]
name = "libffi"
Expand Down Expand Up @@ -369,6 +366,12 @@ version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f"

[[package]]
name = "linux-raw-sys"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128"

[[package]]
name = "lock_api"
version = "0.4.9"
Expand Down Expand Up @@ -454,7 +457,7 @@ version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"cfg-if",
"libc",
"static_assertions",
Expand Down Expand Up @@ -581,7 +584,7 @@ version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
dependencies = [
"bitflags",
"bitflags 1.3.2",
]

[[package]]
Expand All @@ -590,7 +593,7 @@ version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
dependencies = [
"bitflags",
"bitflags 1.3.2",
]

[[package]]
Expand Down Expand Up @@ -655,11 +658,24 @@ version = "0.37.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"errno",
"io-lifetimes",
"libc",
"linux-raw-sys",
"linux-raw-sys 0.3.7",
"windows-sys 0.48.0",
]

[[package]]
name = "rustix"
version = "0.38.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f"
dependencies = [
"bitflags 2.4.0",
"errno",
"libc",
"linux-raw-sys 0.4.7",
"windows-sys 0.48.0",
]

Expand Down Expand Up @@ -756,7 +772,7 @@ dependencies = [
"cfg-if",
"fastrand",
"redox_syscall 0.3.5",
"rustix",
"rustix 0.37.19",
"windows-sys 0.45.0",
]

Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ Some of these are **unsound**, which means they can lead
to Miri failing to detect cases of undefined behavior in a program.

* `-Zmiri-disable-abi-check` disables checking [function ABI]. Using this flag
is **unsound**.
is **unsound**. This flag is **deprecated**.
* `-Zmiri-disable-alignment-check` disables checking pointer alignment, so you
can focus on other failures, but it means Miri can miss bugs in your program.
Using this flag is **unsound**.
Expand Down
4 changes: 2 additions & 2 deletions src/tools/miri/miri-script/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ impl Command {
"Confirmed that the push round-trips back to Miri properly. Please create a rustc PR:"
);
println!(
// Open PR with `subtree-sync` label to satisfy the `no-merges` triagebot check
// Open PR with `subtree update` title to silence the `no-merges` triagebot check
// See https://github.com/rust-lang/rust/pull/114157
" https://github.com/rust-lang/rust/compare/{github_user}:{branch}?quick_pull=1&labels=subtree-sync"
" https://github.com/rust-lang/rust/compare/{github_user}:{branch}?quick_pull=1&title=Miri+subtree+update"
);

drop(josh);
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
366dab13f711df90a6891411458544199d159cbc
42ca6e4e5760a548a6fa858482de6d237f6fb3b8
8 changes: 6 additions & 2 deletions src/tools/miri/src/bin/miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ use rustc_middle::{
middle::exported_symbols::{
ExportedSymbol, SymbolExportInfo, SymbolExportKind, SymbolExportLevel,
},
query::{LocalCrate},
util::Providers,
query::LocalCrate,
ty::TyCtxt,
util::Providers,
};
use rustc_session::config::{CrateType, ErrorOutputType, OptLevel};
use rustc_session::search_paths::PathKind;
Expand Down Expand Up @@ -359,6 +359,10 @@ fn main() {
since it is now enabled by default"
);
} else if arg == "-Zmiri-disable-abi-check" {
eprintln!(
"WARNING: the flag `-Zmiri-disable-abi-check` is deprecated and planned to be removed.\n\
If you have a use-case for it, please file an issue."
);
miri_config.check_abi = false;
} else if arg == "-Zmiri-disable-isolation" {
if matches!(isolation_enabled, Some(true)) {
Expand Down
111 changes: 111 additions & 0 deletions src/tools/miri/src/borrow_tracker/tree_borrows/exhaustive.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
//! Exhaustive testing utilities.
//! (These are used in Tree Borrows `#[test]`s for thorough verification
//! of the behavior of the state machine of permissions,
//! but the contents of this file are extremely generic)
#![cfg(test)]

pub trait Exhaustive: Sized {
fn exhaustive() -> Box<dyn Iterator<Item = Self>>;
}

macro_rules! precondition {
($cond:expr) => {
if !$cond {
continue;
}
};
}
pub(crate) use precondition;

// Trivial impls of `Exhaustive` for the standard types with 0, 1 and 2 elements respectively.

impl Exhaustive for ! {
fn exhaustive() -> Box<dyn Iterator<Item = Self>> {
Box::new(std::iter::empty())
}
}

impl Exhaustive for () {
fn exhaustive() -> Box<dyn Iterator<Item = Self>> {
Box::new(std::iter::once(()))
}
}

impl Exhaustive for bool {
fn exhaustive() -> Box<dyn Iterator<Item = Self>> {
Box::new(vec![true, false].into_iter())
}
}

// Some container impls for `Exhaustive`.

impl<T> Exhaustive for Option<T>
where
T: Exhaustive + 'static,
{
fn exhaustive() -> Box<dyn Iterator<Item = Self>> {
Box::new(std::iter::once(None).chain(T::exhaustive().map(Some)))
}
}

impl<T1, T2> Exhaustive for (T1, T2)
where
T1: Exhaustive + Clone + 'static,
T2: Exhaustive + 'static,
{
fn exhaustive() -> Box<dyn Iterator<Item = Self>> {
Box::new(T1::exhaustive().flat_map(|t1| T2::exhaustive().map(move |t2| (t1.clone(), t2))))
}
}

impl<T> Exhaustive for [T; 1]
where
T: Exhaustive + 'static,
{
fn exhaustive() -> Box<dyn Iterator<Item = Self>> {
Box::new(T::exhaustive().map(|t| [t]))
}
}

impl<T> Exhaustive for [T; 2]
where
T: Exhaustive + Clone + 'static,
{
fn exhaustive() -> Box<dyn Iterator<Item = Self>> {
Box::new(T::exhaustive().flat_map(|t1| T::exhaustive().map(move |t2| [t1.clone(), t2])))
}
}

impl<T> Exhaustive for [T; 3]
where
T: Exhaustive + Clone + 'static,
{
fn exhaustive() -> Box<dyn Iterator<Item = Self>> {
Box::new(
<[T; 2]>::exhaustive()
.flat_map(|[t1, t2]| T::exhaustive().map(move |t3| [t1.clone(), t2.clone(), t3])),
)
}
}

impl<T> Exhaustive for [T; 4]
where
T: Exhaustive + Clone + 'static,
{
fn exhaustive() -> Box<dyn Iterator<Item = Self>> {
Box::new(<[T; 2]>::exhaustive().flat_map(|[t1, t2]| {
<[T; 2]>::exhaustive().map(move |[t3, t4]| [t1.clone(), t2.clone(), t3, t4])
}))
}
}

impl<T> Exhaustive for [T; 5]
where
T: Exhaustive + Clone + 'static,
{
fn exhaustive() -> Box<dyn Iterator<Item = Self>> {
Box::new(<[T; 2]>::exhaustive().flat_map(|[t1, t2]| {
<[T; 3]>::exhaustive().map(move |[t3, t4, t5]| [t1.clone(), t2.clone(), t3, t4, t5])
}))
}
}
Loading