@@ -183,17 +183,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
183
183
futex ( this, args, dest) ?;
184
184
}
185
185
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 ) ;
197
188
}
198
189
}
199
190
}
@@ -227,17 +218,11 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
227
218
}
228
219
229
220
_ => {
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 {:?}" ,
232
223
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 ) ;
241
226
}
242
227
} ;
243
228
0 commit comments