From 40c12d197399d9c6bb2089e2909e45dfca324113 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 9 Mar 2024 18:23:26 +0100 Subject: [PATCH 1/6] remove some frame parameters that are no longer needed --- src/helpers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers.rs b/src/helpers.rs index 9e4b5fe8ad..ba9239085c 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -411,7 +411,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { .ok_or_else(|| err_ub_format!("callee has fewer arguments than expected"))?; // Make the local live, and insert the initial value. this.storage_live(local)?; - let callee_arg = this.local_to_place(this.frame_idx(), local)?; + let callee_arg = this.local_to_place(local)?; this.write_immediate(*arg, &callee_arg)?; } if callee_args.next().is_some() { From 4a349d297978039a3372592d5a1a04936d5cdb81 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 9 Mar 2024 18:28:29 +0100 Subject: [PATCH 2/6] remove unnecessary frame parameter from after_local_allocated --- src/machine.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/machine.rs b/src/machine.rs index 19d02c6f74..20deeb2288 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -1473,14 +1473,13 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> { fn after_local_allocated( ecx: &mut InterpCx<'mir, 'tcx, Self>, - frame: usize, local: mir::Local, mplace: &MPlaceTy<'tcx, Provenance>, ) -> InterpResult<'tcx> { let Some(Provenance::Concrete { alloc_id, .. }) = mplace.ptr().provenance else { panic!("after_local_allocated should only be called on fresh allocations"); }; - let local_decl = &ecx.active_thread_stack()[frame].body.local_decls[local]; + let local_decl = &ecx.frame().body.local_decls[local]; let span = local_decl.source_info.span; ecx.machine.allocation_spans.borrow_mut().insert(alloc_id, (span, None)); Ok(()) From fbf7a930b0cdb265d040c0c27fd7ba6266a19d01 Mon Sep 17 00:00:00 2001 From: The 8472 Date: Thu, 14 Mar 2024 00:57:59 +0100 Subject: [PATCH 3/6] update virtual clock in miri test since signed loops now execute more methods --- tests/pass/shims/time-with-isolation2.stdout | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/pass/shims/time-with-isolation2.stdout b/tests/pass/shims/time-with-isolation2.stdout index c68b40b744..dce51a7fdb 100644 --- a/tests/pass/shims/time-with-isolation2.stdout +++ b/tests/pass/shims/time-with-isolation2.stdout @@ -1 +1 @@ -The loop took around 7s +The loop took around 12s From 275061e48453f6ed59c8117ced4f2530d1d3eaf6 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Mon, 11 Mar 2024 13:20:12 +0000 Subject: [PATCH 4/6] Move generate_stacktrace_from_stack away from InterpCx to avoid having to know the `Machine` type --- src/diagnostics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diagnostics.rs b/src/diagnostics.rs index 4683965159..6e612ea34a 100644 --- a/src/diagnostics.rs +++ b/src/diagnostics.rs @@ -528,7 +528,7 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> { use NonHaltingDiagnostic::*; let stacktrace = - MiriInterpCx::generate_stacktrace_from_stack(self.threads.active_thread_stack()); + Frame::generate_stacktrace_from_stack(self.threads.active_thread_stack()); let (stacktrace, _was_pruned) = prune_stacktrace(stacktrace, self); let (title, diag_level) = match &e { From 9676d3118ed75598c5454e757300879aa2d68047 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 15 Mar 2024 07:55:46 +0100 Subject: [PATCH 5/6] Preparing for merge from rustc --- rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-version b/rust-version index 721d6df0f1..e32968d817 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -5ac0b2d0219de2fd6fef86c69ef0cfa1e6c36f3b +ee03c286cfdca26fa5b2a4ee40957625d2c826ff From 222047f6bd350c655416f4c754cc853f9194e869 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 15 Mar 2024 08:09:46 +0100 Subject: [PATCH 6/6] fmt --- src/diagnostics.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/diagnostics.rs b/src/diagnostics.rs index 6e612ea34a..03428b081c 100644 --- a/src/diagnostics.rs +++ b/src/diagnostics.rs @@ -527,8 +527,7 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> { pub fn emit_diagnostic(&self, e: NonHaltingDiagnostic) { use NonHaltingDiagnostic::*; - let stacktrace = - Frame::generate_stacktrace_from_stack(self.threads.active_thread_stack()); + let stacktrace = Frame::generate_stacktrace_from_stack(self.threads.active_thread_stack()); let (stacktrace, _was_pruned) = prune_stacktrace(stacktrace, self); let (title, diag_level) = match &e {