Skip to content

Commit

Permalink
only set frame location during push after preamble is done
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 12, 2020
1 parent c94ed5c commit 5154b66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librustc_mir/interpret/eval_context.rs
Expand Up @@ -640,7 +640,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
// first push a stack frame so we have access to the local substs
let pre_frame = Frame {
body,
loc: Some(mir::Location::START),
loc: None, // `None` for errors generated before we start evaluating.
return_to_block,
return_place,
// empty local array, we fill it in below, after we are inside the stack frame and
Expand Down Expand Up @@ -683,6 +683,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
}
// done
self.frame_mut().locals = locals;
self.frame_mut().loc = Some(mir::Location::START);

M::after_stack_push(self)?;
info!("ENTERING({}) {}", self.frame_idx(), self.frame().instance);
Expand Down

0 comments on commit 5154b66

Please sign in to comment.