Skip to content

Commit

Permalink
Merge from rustc
Browse files Browse the repository at this point in the history
  • Loading branch information
The Miri Cronjob Bot committed Dec 15, 2024
2 parents aa4515e + b3916b8 commit 5cada13
Show file tree
Hide file tree
Showing 13 changed files with 9 additions and 17 deletions.
5 changes: 2 additions & 3 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,9 @@ pub fn iter_exported_symbols<'tcx>(
let dependency_formats = tcx.dependency_formats(());
// Find the dependencies of the executable we are running.
let dependency_format = dependency_formats
.iter()
.find(|(crate_type, _)| *crate_type == CrateType::Executable)
.get(&CrateType::Executable)
.expect("interpreting a non-executable crate");
for cnum in dependency_format.1.iter().enumerate().filter_map(|(num, &linkage)| {
for cnum in dependency_format.iter().enumerate().filter_map(|(num, &linkage)| {
// We add 1 to the number because that's what rustc also does everywhere it
// calls `CrateNum::new`...
#[expect(clippy::arithmetic_side_effects)]
Expand Down
8 changes: 6 additions & 2 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1571,8 +1571,12 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
res
}

fn after_local_read(ecx: &InterpCx<'tcx, Self>, local: mir::Local) -> InterpResult<'tcx> {
if let Some(data_race) = &ecx.frame().extra.data_race {
fn after_local_read(
ecx: &InterpCx<'tcx, Self>,
frame: &Frame<'tcx, Provenance, FrameExtra<'tcx>>,
local: mir::Local,
) -> InterpResult<'tcx> {
if let Some(data_race) = &frame.extra.data_race {
data_race.local_read(local, &ecx.machine);
}
interp_ok(())
Expand Down
3 changes: 1 addition & 2 deletions tests/fail-dep/concurrency/windows_join_main.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ note: inside `main`
LL | / thread::spawn(|| {
LL | | unsafe {
LL | | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0);
LL | | }
LL | | })
... |
LL | | .join()
| |___________^

Expand Down
1 change: 0 additions & 1 deletion tests/fail/function_calls/arg_inplace_mutate.stack.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ LL | | let _unit: ();
LL | | {
LL | | let non_copy = S(42);
... |
LL | | }
LL | | }
| |_____^
help: <TAG> is this argument
Expand Down
1 change: 0 additions & 1 deletion tests/fail/function_calls/arg_inplace_mutate.tree.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ LL | | let _unit: ();
LL | | {
LL | | let non_copy = S(42);
... |
LL | | }
LL | | }
| |_____^
help: the protected tag <TAG> was created here, in the initial state Reserved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ LL | | let _unit: ();
LL | | {
LL | | let non_copy = S(42);
... |
LL | |
LL | | }
| |_____^
help: <TAG> is this argument
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ LL | | let _unit: ();
LL | | {
LL | | let non_copy = S(42);
... |
LL | |
LL | | }
| |_____^
help: the protected tag <TAG> was created here, in the initial state Reserved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ LL | | {
LL | | let x = 0;
LL | | let ptr = &raw mut x;
... |
LL | | }
LL | | }
| |_____^
help: <TAG> is this argument
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ LL | | {
LL | | let x = 0;
LL | | let ptr = &raw mut x;
... |
LL | | }
LL | | }
| |_____^
help: the protected tag <TAG> was created here, in the initial state Reserved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ LL | | {
LL | | let _x = 0;
LL | | let ptr = &raw mut _x;
... |
LL | | }
LL | | }
| |_____^
help: <TAG> is this argument
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ LL | | {
LL | | let _x = 0;
LL | | let ptr = &raw mut _x;
... |
LL | | }
LL | | }
| |_____^
help: the protected tag <TAG> was created here, in the initial state Reserved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ LL | | {
LL | | let _x = 0;
LL | | let ptr = &raw mut _x;
... |
LL | | }
LL | | }
| |_____^
help: <TAG> is this argument
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ LL | | {
LL | | let _x = 0;
LL | | let ptr = &raw mut _x;
... |
LL | | }
LL | | }
| |_____^
help: the protected tag <TAG> was created here, in the initial state Reserved
Expand Down

0 comments on commit 5cada13

Please sign in to comment.