also indicate abort via new MachineStop variant
This commit is contained in:
parent
1c420b0b55
commit
dcdd68b936
3 changed files with 4 additions and 5 deletions
|
|
@ -212,7 +212,7 @@ pub fn eval_main<'tcx>(tcx: TyCtxt<'tcx>, main_id: DefId, config: MiriConfig) ->
|
|||
match info {
|
||||
TerminationInfo::Exit(code) => return Some(*code),
|
||||
TerminationInfo::Abort =>
|
||||
format!("The program aborted execution")
|
||||
format!("the evaluated program aborted execution")
|
||||
}
|
||||
}
|
||||
err_unsup!(NoMirFor(..)) =>
|
||||
|
|
|
|||
|
|
@ -34,9 +34,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
|
|||
// Handle diverging intrinsics.
|
||||
let (dest, ret) = match intrinsic_name {
|
||||
"abort" => {
|
||||
// FIXME: Add a better way of indicating 'abnormal' termination,
|
||||
// since this is not really an 'unsupported' behavior
|
||||
throw_unsup_format!("the evaluated program aborted!");
|
||||
let ti = Box::new(TerminationInfo::Abort);
|
||||
return Err(InterpError::MachineStop(ti).into());
|
||||
}
|
||||
"miri_start_panic" => return this.handle_miri_start_panic(args, unwind),
|
||||
_ => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//error-pattern: the evaluated program aborted
|
||||
// error-pattern: the evaluated program aborted
|
||||
struct Foo;
|
||||
impl Drop for Foo {
|
||||
fn drop(&mut self) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue