@@ -54,6 +54,8 @@ pub struct MiriConfig {
5454 /// Rate of spurious failures for compare_exchange_weak atomic operations,
5555 /// between 0.0 and 1.0, defaulting to 0.8 (80% chance of failure).
5656 pub cmpxchg_weak_failure_rate : f64 ,
57+ /// Panic when unsupported syscalls are encountered
58+ pub panic_on_unsupported_syscalls : bool ,
5759}
5860
5961impl Default for MiriConfig {
@@ -73,6 +75,7 @@ impl Default for MiriConfig {
7375 track_raw : false ,
7476 data_race_detector : true ,
7577 cmpxchg_weak_failure_rate : 0.8 ,
78+ panic_on_unsupported_syscalls : false ,
7679 }
7780 }
7881}
@@ -92,8 +95,8 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
9295 tcx,
9396 rustc_span:: source_map:: DUMMY_SP ,
9497 param_env,
95- Evaluator :: new ( config. communicate , config. validate , layout_cx) ,
96- MemoryExtra :: new ( & config) ,
98+ Evaluator :: new ( config. communicate , config. validate , config . panic_on_unsupported_syscalls , layout_cx) ,
99+ MemoryExtra :: new ( & config)
97100 ) ;
98101 // Complete initialization.
99102 EnvVars :: init ( & mut ecx, config. excluded_env_vars ) ?;
0 commit comments