@@ -183,17 +183,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
183183 futex ( this, args, dest) ?;
184184 }
185185 id => {
186- let error_msg = format ! (
187- "unsupported Miri functionality: syscall ID {} is not emulated" ,
188- id
189- ) ;
190- if this. eval_context_ref ( ) . machine . panic_on_unsupported {
191- // message is slightly different here to make automated analysis easier
192- this. start_panic ( error_msg. as_ref ( ) , StackPopUnwind :: Skip ) ?;
193- return Ok ( false ) ;
194- } else {
195- throw_unsup_format ! ( "{}" , error_msg) ;
196- }
186+ this. handle_unsupported ( format ! ( "syscall ID {} is not emulated" , id) ) ?;
187+ return Ok ( false ) ;
197188 }
198189 }
199190 }
@@ -227,17 +218,11 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
227218 }
228219
229220 _ => {
230- let error_msg = format ! (
231- "unsupported Miri functionality: can't call foreign function {:?}" ,
221+ this . handle_unsupported ( format ! (
222+ "can't call foreign function {:?}" ,
232223 link_name
233- ) ;
234- if this. eval_context_ref ( ) . machine . panic_on_unsupported {
235- // message is slightly different here to make automated analysis easier
236- this. start_panic ( error_msg. as_ref ( ) , StackPopUnwind :: Skip ) ?;
237- return Ok ( false ) ;
238- } else {
239- throw_unsup_format ! ( "{}" , error_msg) ;
240- }
224+ ) ) ?;
225+ return Ok ( false ) ;
241226 }
242227 } ;
243228
0 commit comments