Skip to content

Miri subtree update #144019

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 44 commits into from
Jul 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
4350659
miri-script: set msrv so clippy doesn't suggest too-new features
RalfJung Jul 5, 2025
6ea0b65
Merge pull request #4447 from RalfJung/miri-script-msrv
RalfJung Jul 5, 2025
d87984e
shims::fs adding more fields to FileMetadata
devnexen Jul 5, 2025
ef0490c
minor cleanup
RalfJung Jul 5, 2025
b2d8c81
Merge pull request #4444 from devnexen/filemetadata_upd
RalfJung Jul 5, 2025
e40f8b2
rename panic_paylods → unwind_payloads
RalfJung Jul 6, 2025
59af8f3
Preparing for merge from rustc
Jul 7, 2025
0e043a8
Merge from rustc
Jul 7, 2025
51cba78
Merge pull request #4449 from rust-lang/rustup-2025-07-07
RalfJung Jul 7, 2025
ae3b976
split unwinding logic from panic logic
RalfJung Jul 7, 2025
a96e73f
Merge pull request #4450 from RalfJung/unwind-payloads
RalfJung Jul 7, 2025
e296e6b
move our data structures into a central location
RalfJung Jul 7, 2025
0d306dd
Preparing for merge from rustc
RalfJung Jul 8, 2025
bd84ba8
Merge from rustc
RalfJung Jul 8, 2025
9110617
Merge pull request #4455 from RalfJung/rustup
RalfJung Jul 8, 2025
5058f90
Merge pull request #4454 from RalfJung/data_structure
oli-obk Jul 8, 2025
3bd0b89
various native-lib-trace-related fixups
nia-e Jul 2, 2025
a09cf9c
Merge pull request #4435 from nia-e/trace-fixups
RalfJung Jul 9, 2025
e726c64
Preparing for merge from rustc
Jul 10, 2025
1f721c6
Merge from rustc
Jul 10, 2025
5e940f5
fmt
Jul 10, 2025
17b240e
silence clippy
RalfJung Jul 10, 2025
317f59d
Merge pull request #4458 from rust-lang/rustup-2025-07-10
RalfJung Jul 10, 2025
bccc32b
readme: update strict provenance link
RalfJung Jul 12, 2025
91a52ca
Merge pull request #4465 from RalfJung/readme-strict-provenance
RalfJung Jul 12, 2025
dbeb05c
Preparing for merge from rustc
Jul 14, 2025
8812d74
Merge from rustc
Jul 14, 2025
794dc32
Merge pull request #4467 from rust-lang/rustup-2025-07-14
RalfJung Jul 14, 2025
a9a5b33
Preparing for merge from rustc
Jul 15, 2025
f7da021
Merge from rustc
Jul 15, 2025
5453326
Merge pull request #4468 from rust-lang/rustup-2025-07-15
RalfJung Jul 15, 2025
e1d35c5
Add std::hint::spin_loop()
Patrick-6 Jul 15, 2025
6b51eee
Add enter_trace_span! that checks #[cfg("tracing")]
Stypox Jul 7, 2025
2ee58dc
Add tracing calls to borrow tracker under the same name
Stypox Jul 7, 2025
da40065
Merge pull request #4452 from Stypox/trace-borrow-tracker
RalfJung Jul 15, 2025
9a76dde
Make spin function naming more consistent
Patrick-6 Jul 15, 2025
62aea72
Merge pull request #4469 from Patrick-6/add-spinloop-hints
RalfJung Jul 15, 2025
85c8949
add support for global constructors (i.e. life before main)
ibraheemdev Jul 10, 2025
d060859
add test for global constructors
ibraheemdev Jul 10, 2025
06f0dca
hook up native-lib bits
nia-e Jul 7, 2025
7daf0e6
update comment to reference legacy `.ctors` section
ibraheemdev Jul 16, 2025
ed212ff
Merge pull request #4456 from nia-e/trace-incorporate-events
RalfJung Jul 16, 2025
a7818ab
minor tweaks and comments
RalfJung Jul 16, 2025
fe090db
Merge pull request #4459 from ibraheemdev/ibraheem/global-ctor
RalfJung Jul 16, 2025
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
6 changes: 3 additions & 3 deletions src/tools/miri/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,9 @@ environment variable. We first document the most relevant and most commonly used
is enabled (the default), this is also used to emulate system entropy. The default seed is 0. You
can increase test coverage by running Miri multiple times with different seeds.
* `-Zmiri-strict-provenance` enables [strict
provenance](https://github.com/rust-lang/rust/issues/95228) checking in Miri. This means that
casting an integer to a pointer will stop execution because the provenance of the pointer
cannot be determined.
provenance](https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance) checking in
Miri. This means that casting an integer to a pointer will stop execution because the provenance
of the pointer cannot be determined.
* `-Zmiri-symbolic-alignment-check` makes the alignment check more strict. By default, alignment is
checked by casting the pointer to an integer, and making sure that is a multiple of the alignment.
This can lead to cases where a program passes the alignment check by pure chance, because things
Expand Down
1 change: 1 addition & 0 deletions src/tools/miri/miri-script/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ repository = "https://github.com/rust-lang/miri"
version = "0.1.0"
default-run = "miri-script"
edition = "2024"
rust-version = "1.85"

[workspace]
# We make this a workspace root so that cargo does not go looking in ../Cargo.toml for the workspace root.
Expand Down
2 changes: 0 additions & 2 deletions src/tools/miri/miri-script/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,6 @@ impl Command {
let mut early_flags = Vec::<OsString>::new();

// In `dep` mode, the target is already passed via `MIRI_TEST_TARGET`
#[expect(clippy::collapsible_if)] // we need to wait until this is stable
if !dep {
if let Some(target) = &target {
early_flags.push("--target".into());
Expand Down Expand Up @@ -735,7 +734,6 @@ impl Command {
// Add Miri flags
let mut cmd = cmd.args(&miri_flags).args(&early_flags).args(&flags);
// For `--dep` we also need to set the target in the env var.
#[expect(clippy::collapsible_if)] // we need to wait until this is stable
if dep {
if let Some(target) = &target {
cmd = cmd.env("MIRI_TEST_TARGET", target);
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 @@
733b47ea4b1b86216f14ef56e49440c33933f230
7f2065a4bae1faed5bab928c670964eafbf43b55
21 changes: 9 additions & 12 deletions src/tools/miri/src/alloc/isolated_alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,31 +302,28 @@ impl IsolatedAlloc {
}
}

/// Returns a vector of page addresses managed by the allocator.
pub fn pages(&self) -> Vec<usize> {
let mut pages: Vec<usize> =
self.page_ptrs.iter().map(|p| p.expose_provenance().get()).collect();
for (ptr, size) in self.huge_ptrs.iter() {
for i in 0..size / self.page_size {
pages.push(ptr.expose_provenance().get().strict_add(i * self.page_size));
}
}
pages
/// Returns a list of page addresses managed by the allocator.
pub fn pages(&self) -> impl Iterator<Item = usize> {
let pages = self.page_ptrs.iter().map(|p| p.expose_provenance().get());
pages.chain(self.huge_ptrs.iter().flat_map(|(ptr, size)| {
(0..size / self.page_size)
.map(|i| ptr.expose_provenance().get().strict_add(i * self.page_size))
}))
}

/// Protects all owned memory as `PROT_NONE`, preventing accesses.
///
/// SAFETY: Accessing memory after this point will result in a segfault
/// unless it is first unprotected.
pub unsafe fn prepare_ffi(&mut self) -> Result<(), nix::errno::Errno> {
pub unsafe fn start_ffi(&mut self) -> Result<(), nix::errno::Errno> {
let prot = mman::ProtFlags::PROT_NONE;
unsafe { self.mprotect(prot) }
}

/// Deprotects all owned memory by setting it to RW. Erroring here is very
/// likely unrecoverable, so it may panic if applying those permissions
/// fails.
pub fn unprep_ffi(&mut self) {
pub fn end_ffi(&mut self) {
let prot = mman::ProtFlags::PROT_READ | mman::ProtFlags::PROT_WRITE;
unsafe {
self.mprotect(prot).unwrap();
Expand Down
30 changes: 16 additions & 14 deletions src/tools/miri/src/bin/miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,6 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
} else {
let return_code = miri::eval_entry(tcx, entry_def_id, entry_type, &config, None)
.unwrap_or_else(|| {
//#[cfg(target_os = "linux")]
//miri::native_lib::register_retcode_sv(rustc_driver::EXIT_FAILURE);
tcx.dcx().abort_if_errors();
rustc_driver::EXIT_FAILURE
});
Expand Down Expand Up @@ -337,6 +335,9 @@ impl rustc_driver::Callbacks for MiriBeRustCompilerCalls {
fn exit(exit_code: i32) -> ! {
// Drop the tracing guard before exiting, so tracing calls are flushed correctly.
deinit_loggers();
// Make sure the supervisor knows about the code code.
#[cfg(target_os = "linux")]
miri::native_lib::register_retcode_sv(exit_code);
std::process::exit(exit_code);
}

Expand All @@ -355,6 +356,11 @@ fn run_compiler_and_exit(
args: &[String],
callbacks: &mut (dyn rustc_driver::Callbacks + Send),
) -> ! {
// Install the ctrlc handler that sets `rustc_const_eval::CTRL_C_RECEIVED`, even if
// MIRI_BE_RUSTC is set. We do this late so that when `native_lib::init_sv` is called,
// there are no other threads.
rustc_driver::install_ctrlc_handler();

// Invoke compiler, catch any unwinding panics and handle return code.
let exit_code =
rustc_driver::catch_with_exit_code(move || rustc_driver::run_compiler(args, callbacks));
Expand Down Expand Up @@ -439,10 +445,6 @@ fn main() {
let args = rustc_driver::catch_fatal_errors(|| rustc_driver::args::raw_args(&early_dcx))
.unwrap_or_else(|_| std::process::exit(rustc_driver::EXIT_FAILURE));

// Install the ctrlc handler that sets `rustc_const_eval::CTRL_C_RECEIVED`, even if
// MIRI_BE_RUSTC is set.
rustc_driver::install_ctrlc_handler();

// If the environment asks us to actually be rustc, then do that.
if let Some(crate_kind) = env::var_os("MIRI_BE_RUSTC") {
// Earliest rustc setup.
Expand Down Expand Up @@ -750,15 +752,15 @@ fn main() {

debug!("rustc arguments: {:?}", rustc_args);
debug!("crate arguments: {:?}", miri_config.args);
#[cfg(target_os = "linux")]
if !miri_config.native_lib.is_empty() && miri_config.native_lib_enable_tracing {
// FIXME: This should display a diagnostic / warning on error
// SAFETY: If any other threads exist at this point (namely for the ctrlc
// handler), they will not interact with anything on the main rustc/Miri
// thread in an async-signal-unsafe way such as by accessing shared
// semaphores, etc.; the handler only calls `sleep()` and `exit()`, which
// are async-signal-safe, as is accessing atomics
//let _ = unsafe { miri::native_lib::init_sv() };
// SAFETY: No other threads are running
#[cfg(target_os = "linux")]
if unsafe { miri::native_lib::init_sv() }.is_err() {
eprintln!(
"warning: The native-lib tracer could not be started. Is this an x86 Linux system, and does Miri have permissions to ptrace?\n\
Falling back to non-tracing native-lib mode."
);
}
}
run_compiler_and_exit(
&rustc_args,
Expand Down
18 changes: 18 additions & 0 deletions src/tools/miri/src/borrow_tracker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ impl GlobalStateInner {
kind: MemoryKind,
machine: &MiriMachine<'_>,
) -> AllocState {
let _span = enter_trace_span!(borrow_tracker::new_allocation, ?id, ?alloc_size, ?kind);
match self.borrow_tracker_method {
BorrowTrackerMethod::StackedBorrows =>
AllocState::StackedBorrows(Box::new(RefCell::new(Stacks::new_allocation(
Expand All @@ -280,6 +281,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
kind: RetagKind,
val: &ImmTy<'tcx>,
) -> InterpResult<'tcx, ImmTy<'tcx>> {
let _span = enter_trace_span!(borrow_tracker::retag_ptr_value, ?kind, ?val.layout);
let this = self.eval_context_mut();
let method = this.machine.borrow_tracker.as_ref().unwrap().borrow().borrow_tracker_method;
match method {
Expand All @@ -293,6 +295,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
kind: RetagKind,
place: &PlaceTy<'tcx>,
) -> InterpResult<'tcx> {
let _span = enter_trace_span!(borrow_tracker::retag_place_contents, ?kind, ?place);
let this = self.eval_context_mut();
let method = this.machine.borrow_tracker.as_ref().unwrap().borrow().borrow_tracker_method;
match method {
Expand All @@ -302,6 +305,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
}

fn protect_place(&mut self, place: &MPlaceTy<'tcx>) -> InterpResult<'tcx, MPlaceTy<'tcx>> {
let _span = enter_trace_span!(borrow_tracker::protect_place, ?place);
let this = self.eval_context_mut();
let method = this.machine.borrow_tracker.as_ref().unwrap().borrow().borrow_tracker_method;
match method {
Expand All @@ -311,6 +315,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
}

fn expose_tag(&self, alloc_id: AllocId, tag: BorTag) -> InterpResult<'tcx> {
let _span =
enter_trace_span!(borrow_tracker::expose_tag, alloc_id = alloc_id.0, tag = tag.0);
let this = self.eval_context_ref();
let method = this.machine.borrow_tracker.as_ref().unwrap().borrow().borrow_tracker_method;
match method {
Expand Down Expand Up @@ -354,6 +360,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
&self,
frame: &Frame<'tcx, Provenance, FrameExtra<'tcx>>,
) -> InterpResult<'tcx> {
let _span = enter_trace_span!(borrow_tracker::on_stack_pop);
let this = self.eval_context_ref();
let borrow_tracker = this.machine.borrow_tracker.as_ref().unwrap();
// The body of this loop needs `borrow_tracker` immutably
Expand Down Expand Up @@ -431,6 +438,7 @@ impl AllocState {
range: AllocRange,
machine: &MiriMachine<'tcx>,
) -> InterpResult<'tcx> {
let _span = enter_trace_span!(borrow_tracker::before_memory_read, alloc_id = alloc_id.0);
match self {
AllocState::StackedBorrows(sb) =>
sb.borrow_mut().before_memory_read(alloc_id, prov_extra, range, machine),
Expand All @@ -452,6 +460,7 @@ impl AllocState {
range: AllocRange,
machine: &MiriMachine<'tcx>,
) -> InterpResult<'tcx> {
let _span = enter_trace_span!(borrow_tracker::before_memory_write, alloc_id = alloc_id.0);
match self {
AllocState::StackedBorrows(sb) =>
sb.get_mut().before_memory_write(alloc_id, prov_extra, range, machine),
Expand All @@ -473,6 +482,8 @@ impl AllocState {
size: Size,
machine: &MiriMachine<'tcx>,
) -> InterpResult<'tcx> {
let _span =
enter_trace_span!(borrow_tracker::before_memory_deallocation, alloc_id = alloc_id.0);
match self {
AllocState::StackedBorrows(sb) =>
sb.get_mut().before_memory_deallocation(alloc_id, prov_extra, size, machine),
Expand All @@ -482,6 +493,7 @@ impl AllocState {
}

pub fn remove_unreachable_tags(&self, tags: &FxHashSet<BorTag>) {
let _span = enter_trace_span!(borrow_tracker::remove_unreachable_tags);
match self {
AllocState::StackedBorrows(sb) => sb.borrow_mut().remove_unreachable_tags(tags),
AllocState::TreeBorrows(tb) => tb.borrow_mut().remove_unreachable_tags(tags),
Expand All @@ -496,6 +508,11 @@ impl AllocState {
tag: BorTag,
alloc_id: AllocId, // diagnostics
) -> InterpResult<'tcx> {
let _span = enter_trace_span!(
borrow_tracker::release_protector,
alloc_id = alloc_id.0,
tag = tag.0
);
match self {
AllocState::StackedBorrows(_sb) => interp_ok(()),
AllocState::TreeBorrows(tb) =>
Expand All @@ -506,6 +523,7 @@ impl AllocState {

impl VisitProvenance for AllocState {
fn visit_provenance(&self, visit: &mut VisitWith<'_>) {
let _span = enter_trace_span!(borrow_tracker::visit_provenance);
match self {
AllocState::StackedBorrows(sb) => sb.visit_provenance(visit),
AllocState::TreeBorrows(tb) => tb.visit_provenance(visit),
Expand Down
4 changes: 2 additions & 2 deletions src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub type AllocState = Stacks;
#[derive(Clone, Debug)]
pub struct Stacks {
// Even reading memory can have effects on the stack, so we need a `RefCell` here.
stacks: RangeMap<Stack>,
stacks: DedupRangeMap<Stack>,
/// Stores past operations on this allocation
history: AllocHistory,
/// The set of tags that have been exposed inside this allocation.
Expand Down Expand Up @@ -468,7 +468,7 @@ impl<'tcx> Stacks {
let stack = Stack::new(item);

Stacks {
stacks: RangeMap::new(size, stack),
stacks: DedupRangeMap::new(size, stack),
history: AllocHistory::new(id, item, machine),
exposed_tags: FxHashSet::default(),
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/src/borrow_tracker/tree_borrows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ trait EvalContextPrivExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
let span = this.machine.current_span();

// Store initial permissions and their corresponding range.
let mut perms_map: RangeMap<LocationState> = RangeMap::new(
let mut perms_map: DedupRangeMap<LocationState> = DedupRangeMap::new(
ptr_size,
LocationState::new_accessed(Permission::new_disabled(), IdempotentForeignAccess::None), // this will be overwritten
);
Expand Down
6 changes: 3 additions & 3 deletions src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ pub struct Tree {
/// `unwrap` any `perm.get(key)`.
///
/// We do uphold the fact that `keys(perms)` is a subset of `keys(nodes)`
pub(super) rperms: RangeMap<UniValMap<LocationState>>,
pub(super) rperms: DedupRangeMap<UniValMap<LocationState>>,
/// The index of the root node.
pub(super) root: UniIndex,
}
Expand Down Expand Up @@ -609,7 +609,7 @@ impl Tree {
IdempotentForeignAccess::None,
),
);
RangeMap::new(size, perms)
DedupRangeMap::new(size, perms)
};
Self { root: root_idx, nodes, rperms, tag_mapping }
}
Expand All @@ -631,7 +631,7 @@ impl<'tcx> Tree {
base_offset: Size,
parent_tag: BorTag,
new_tag: BorTag,
initial_perms: RangeMap<LocationState>,
initial_perms: DedupRangeMap<LocationState>,
default_perm: Permission,
protected: bool,
span: Span,
Expand Down
4 changes: 2 additions & 2 deletions src/tools/miri/src/concurrency/data_race.rs
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
#[derive(Debug, Clone)]
pub struct VClockAlloc {
/// Assigning each byte a MemoryCellClocks.
alloc_ranges: RefCell<RangeMap<MemoryCellClocks>>,
alloc_ranges: RefCell<DedupRangeMap<MemoryCellClocks>>,
}

impl VisitProvenance for VClockAlloc {
Expand Down Expand Up @@ -1045,7 +1045,7 @@ impl VClockAlloc {
(VTimestamp::ZERO, global.thread_index(ThreadId::MAIN_THREAD)),
};
VClockAlloc {
alloc_ranges: RefCell::new(RangeMap::new(
alloc_ranges: RefCell::new(DedupRangeMap::new(
len,
MemoryCellClocks::new(alloc_timestamp, alloc_index),
)),
Expand Down
1 change: 0 additions & 1 deletion src/tools/miri/src/concurrency/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ pub mod cpu_affinity;
pub mod data_race;
mod data_race_handler;
pub mod init_once;
mod range_object_map;
pub mod sync;
pub mod thread;
mod vector_clock;
Expand Down
12 changes: 7 additions & 5 deletions src/tools/miri/src/concurrency/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ pub struct Thread<'tcx> {
/// The join status.
join_status: ThreadJoinStatus,

/// Stack of active panic payloads for the current thread. Used for storing
/// the argument of the call to `miri_start_unwind` (the panic payload) when unwinding.
/// Stack of active unwind payloads for the current thread. Used for storing
/// the argument of the call to `miri_start_unwind` (the payload) when unwinding.
/// This is pointer-sized, and matches the `Payload` type in `src/libpanic_unwind/miri.rs`.
///
/// In real unwinding, the payload gets passed as an argument to the landing pad,
/// which then forwards it to 'Resume'. However this argument is implicit in MIR,
/// so we have to store it out-of-band. When there are multiple active unwinds,
/// the innermost one is always caught first, so we can store them as a stack.
pub(crate) panic_payloads: Vec<ImmTy<'tcx>>,
pub(crate) unwind_payloads: Vec<ImmTy<'tcx>>,

/// Last OS error location in memory. It is a 32-bit integer.
pub(crate) last_error: Option<MPlaceTy<'tcx>>,
Expand Down Expand Up @@ -282,7 +282,7 @@ impl<'tcx> Thread<'tcx> {
stack: Vec::new(),
top_user_relevant_frame: None,
join_status: ThreadJoinStatus::Joinable,
panic_payloads: Vec::new(),
unwind_payloads: Vec::new(),
last_error: None,
on_stack_empty,
}
Expand All @@ -292,7 +292,7 @@ impl<'tcx> Thread<'tcx> {
impl VisitProvenance for Thread<'_> {
fn visit_provenance(&self, visit: &mut VisitWith<'_>) {
let Thread {
panic_payloads: panic_payload,
unwind_payloads: panic_payload,
last_error,
stack,
top_user_relevant_frame: _,
Expand Down Expand Up @@ -677,6 +677,8 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> {
fn run_on_stack_empty(&mut self) -> InterpResult<'tcx, Poll<()>> {
let this = self.eval_context_mut();
// Inform GenMC that a thread has finished all user code. GenMC needs to know this for scheduling.
// FIXME(GenMC): Thread-local destructors *are* user code, so this is odd. Also now that we
// support pre-main constructors, it can get called there as well.
if let Some(genmc_ctx) = this.machine.data_race.as_genmc_ref() {
let thread_id = this.active_thread();
genmc_ctx.handle_thread_stack_empty(thread_id);
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/src/concurrency/weak_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ use rustc_data_structures::fx::FxHashMap;

use super::AllocDataRaceHandler;
use super::data_race::{GlobalState as DataRaceState, ThreadClockSet};
use super::range_object_map::{AccessType, RangeObjectMap};
use super::vector_clock::{VClock, VTimestamp, VectorIdx};
use crate::concurrency::GlobalDataRaceHandler;
use crate::data_structures::range_object_map::{AccessType, RangeObjectMap};
use crate::*;

pub type AllocState = StoreBufferAlloc;
Expand Down
Loading
Loading