@@ -1115,7 +1115,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
1115
1115
instance : ty:: Instance < ' tcx > ,
1116
1116
abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
1117
1117
args : & [ FnArg < ' tcx , Provenance > ] ,
1118
- dest : & MPlaceTy < ' tcx > ,
1118
+ dest : & PlaceTy < ' tcx > ,
1119
1119
ret : Option < mir:: BasicBlock > ,
1120
1120
unwind : mir:: UnwindAction ,
1121
1121
) -> InterpResult < ' tcx , Option < ( & ' tcx mir:: Body < ' tcx > , ty:: Instance < ' tcx > ) > > {
@@ -1142,7 +1142,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
1142
1142
fn_val : DynSym ,
1143
1143
abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
1144
1144
args : & [ FnArg < ' tcx , Provenance > ] ,
1145
- dest : & MPlaceTy < ' tcx > ,
1145
+ dest : & PlaceTy < ' tcx > ,
1146
1146
ret : Option < mir:: BasicBlock > ,
1147
1147
unwind : mir:: UnwindAction ,
1148
1148
) -> InterpResult < ' tcx > {
@@ -1155,7 +1155,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
1155
1155
ecx : & mut MiriInterpCx < ' tcx > ,
1156
1156
instance : ty:: Instance < ' tcx > ,
1157
1157
args : & [ OpTy < ' tcx > ] ,
1158
- dest : & MPlaceTy < ' tcx > ,
1158
+ dest : & PlaceTy < ' tcx > ,
1159
1159
ret : Option < mir:: BasicBlock > ,
1160
1160
unwind : mir:: UnwindAction ,
1161
1161
) -> InterpResult < ' tcx , Option < ty:: Instance < ' tcx > > > {
@@ -1634,15 +1634,21 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
1634
1634
interp_ok ( ( ) )
1635
1635
}
1636
1636
1637
- fn before_stack_pop (
1638
- ecx : & InterpCx < ' tcx , Self > ,
1639
- frame : & Frame < ' tcx , Self :: Provenance , Self :: FrameExtra > ,
1640
- ) -> InterpResult < ' tcx > {
1637
+ fn before_stack_pop ( ecx : & mut InterpCx < ' tcx , Self > ) -> InterpResult < ' tcx > {
1638
+ let frame = ecx. frame ( ) ;
1641
1639
// We want this *before* the return value copy, because the return place itself is protected
1642
1640
// until we do `end_call` here.
1643
1641
if ecx. machine . borrow_tracker . is_some ( ) {
1644
1642
ecx. on_stack_pop ( frame) ?;
1645
1643
}
1644
+ if frame. extra . is_user_relevant {
1645
+ // All that we store is whether or not the frame we just removed is local, so now we
1646
+ // have no idea where the next topmost local frame is. So we recompute it.
1647
+ // (If this ever becomes a bottleneck, we could have `push` store the previous
1648
+ // user-relevant frame and restore that here.)
1649
+ // We have to skip the frame that is just being popped.
1650
+ ecx. active_thread_mut ( ) . recompute_top_user_relevant_frame ( /* skip */ 1 ) ;
1651
+ }
1646
1652
// tracing-tree can autoamtically annotate scope changes, but it gets very confused by our
1647
1653
// concurrency and what it prints is just plain wrong. So we print our own information
1648
1654
// instead. (Cc https://github.com/rust-lang/miri/issues/2266)
@@ -1656,15 +1662,8 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
1656
1662
frame : Frame < ' tcx , Provenance , FrameExtra < ' tcx > > ,
1657
1663
unwinding : bool ,
1658
1664
) -> InterpResult < ' tcx , ReturnAction > {
1659
- if frame. extra . is_user_relevant {
1660
- // All that we store is whether or not the frame we just removed is local, so now we
1661
- // have no idea where the next topmost local frame is. So we recompute it.
1662
- // (If this ever becomes a bottleneck, we could have `push` store the previous
1663
- // user-relevant frame and restore that here.)
1664
- ecx. active_thread_mut ( ) . recompute_top_user_relevant_frame ( ) ;
1665
- }
1666
1665
let res = {
1667
- // Move `frame`` into a sub-scope so we control when it will be dropped.
1666
+ // Move `frame` into a sub-scope so we control when it will be dropped.
1668
1667
let mut frame = frame;
1669
1668
let timing = frame. extra . timing . take ( ) ;
1670
1669
let res = ecx. handle_stack_pop_unwind ( frame. extra , unwinding) ;
@@ -1804,6 +1803,9 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
1804
1803
) -> Cow < ' e , RangeSet > {
1805
1804
Cow :: Borrowed ( ecx. machine . union_data_ranges . entry ( ty) . or_insert_with ( compute_range) )
1806
1805
}
1806
+
1807
+ /// Placeholder!
1808
+ fn get_default_alloc_params ( & self ) -> <Self :: Bytes as AllocBytes >:: AllocParams { }
1807
1809
}
1808
1810
1809
1811
/// Trait for callbacks handling asynchronous machine operations.
0 commit comments