Skip to content

Commit

Permalink
re-add miri intrinsic ABI check
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Nov 16, 2019
1 parent 1d8b6ce commit 405866a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/librustc_mir/interpret/terminator.rs
Expand Up @@ -264,6 +264,11 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {

match instance.def {
ty::InstanceDef::Intrinsic(..) => {
if caller_abi != Abi::RustIntrinsic && caller_abi != Abi::PlatformIntrinsic {
throw_ub_format!("Rust intrinsic called with an ABI other than \
`RustIntrinsic` and `PlatformIntrinsic`.");
}

let old_stack = self.cur_frame();
let old_bb = self.frame().block;
M::call_intrinsic(self, span, instance, args, dest, ret, unwind)?;
Expand Down

0 comments on commit 405866a

Please sign in to comment.