@@ -1115,7 +1115,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
11151115 instance : ty:: Instance < ' tcx > ,
11161116 abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
11171117 args : & [ FnArg < ' tcx , Provenance > ] ,
1118- dest : & MPlaceTy < ' tcx > ,
1118+ dest : & PlaceTy < ' tcx > ,
11191119 ret : Option < mir:: BasicBlock > ,
11201120 unwind : mir:: UnwindAction ,
11211121 ) -> InterpResult < ' tcx , Option < ( & ' tcx mir:: Body < ' tcx > , ty:: Instance < ' tcx > ) > > {
@@ -1142,7 +1142,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
11421142 fn_val : DynSym ,
11431143 abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
11441144 args : & [ FnArg < ' tcx , Provenance > ] ,
1145- dest : & MPlaceTy < ' tcx > ,
1145+ dest : & PlaceTy < ' tcx > ,
11461146 ret : Option < mir:: BasicBlock > ,
11471147 unwind : mir:: UnwindAction ,
11481148 ) -> InterpResult < ' tcx > {
@@ -1155,7 +1155,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
11551155 ecx : & mut MiriInterpCx < ' tcx > ,
11561156 instance : ty:: Instance < ' tcx > ,
11571157 args : & [ OpTy < ' tcx > ] ,
1158- dest : & MPlaceTy < ' tcx > ,
1158+ dest : & PlaceTy < ' tcx > ,
11591159 ret : Option < mir:: BasicBlock > ,
11601160 unwind : mir:: UnwindAction ,
11611161 ) -> InterpResult < ' tcx , Option < ty:: Instance < ' tcx > > > {
@@ -1634,15 +1634,21 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
16341634 interp_ok ( ( ) )
16351635 }
16361636
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 ( ) ;
16411639 // We want this *before* the return value copy, because the return place itself is protected
16421640 // until we do `end_call` here.
16431641 if ecx. machine . borrow_tracker . is_some ( ) {
16441642 ecx. on_stack_pop ( frame) ?;
16451643 }
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+ }
16461652 // tracing-tree can autoamtically annotate scope changes, but it gets very confused by our
16471653 // concurrency and what it prints is just plain wrong. So we print our own information
16481654 // instead. (Cc https://github.com/rust-lang/miri/issues/2266)
@@ -1656,15 +1662,8 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
16561662 frame : Frame < ' tcx , Provenance , FrameExtra < ' tcx > > ,
16571663 unwinding : bool ,
16581664 ) -> 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- }
16661665 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.
16681667 let mut frame = frame;
16691668 let timing = frame. extra . timing . take ( ) ;
16701669 let res = ecx. handle_stack_pop_unwind ( frame. extra , unwinding) ;
@@ -1804,6 +1803,9 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
18041803 ) -> Cow < ' e , RangeSet > {
18051804 Cow :: Borrowed ( ecx. machine . union_data_ranges . entry ( ty) . or_insert_with ( compute_range) )
18061805 }
1806+
1807+ /// Placeholder!
1808+ fn get_default_alloc_params ( & self ) -> <Self :: Bytes as AllocBytes >:: AllocParams { }
18071809}
18081810
18091811/// Trait for callbacks handling asynchronous machine operations.
0 commit comments